Commit 6b7b6f45 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Don't use throw_exception helper for length_error exception.

parent c306c527
......@@ -485,4 +485,5 @@ typedef struct {
} complex_double;
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
void __cdecl DECLSPEC_NORETURN _Xmem(void);
......@@ -55,10 +55,8 @@ void __cdecl _Xran(void)
/* ?_Xlen@std@@YAXXZ */
void __cdecl _Xlen(void)
{
static const char msg[] = "string too long";
TRACE("\n");
throw_exception(EXCEPTION_LENGTH_ERROR, msg);
_Xlength_error("string too long");
}
/* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
......
......@@ -319,7 +319,6 @@ typedef enum __exception_type {
EXCEPTION,
EXCEPTION_BAD_CAST,
EXCEPTION_LOGIC_ERROR,
EXCEPTION_LENGTH_ERROR,
EXCEPTION_OUT_OF_RANGE,
EXCEPTION_INVALID_ARGUMENT,
EXCEPTION_RUNTIME_ERROR,
......
......@@ -898,10 +898,15 @@ void __cdecl _Xinvalid_argument(const char *str)
/* ?_Xlength_error@std@@YAXPBD@Z */
/* ?_Xlength_error@std@@YAXPEBD@Z */
void __cdecl _Xlength_error(const char *str)
void __cdecl DECLSPEC_NORETURN _Xlength_error(const char *str)
{
exception_name name = EXCEPTION_NAME(str);
length_error e;
TRACE("(%s)\n", debugstr_a(str));
throw_exception(EXCEPTION_LENGTH_ERROR, str);
MSVCP_length_error_ctor(&e, name);
_CxxThrowException(&e, &length_error_cxx_type);
}
/* ?_Xout_of_range@std@@YAXPBD@Z */
......@@ -1066,11 +1071,6 @@ void throw_exception(exception_type et, const char *str)
MSVCP_logic_error_ctor(&e, name);
_CxxThrowException(&e, &logic_error_cxx_type);
}
case EXCEPTION_LENGTH_ERROR: {
length_error e;
MSVCP_length_error_ctor(&e, name);
_CxxThrowException(&e, &length_error_cxx_type);
}
case EXCEPTION_OUT_OF_RANGE: {
out_of_range e;
MSVCP_out_of_range_ctor(&e, name);
......
......@@ -664,4 +664,5 @@ static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, cons
#endif
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
void __cdecl DECLSPEC_NORETURN _Xmem(void);
......@@ -454,10 +454,8 @@ unsigned short CDECL MSVCP_char_traits_short_not_eof(const unsigned short *in)
/* ?_Xlen@_String_base@std@@SAXXZ */
void CDECL MSVCP__String_base_Xlen(void)
{
static const char msg[] = "string too long";
TRACE("\n");
throw_exception(EXCEPTION_LENGTH_ERROR, msg);
_Xlength_error("string too long");
}
/* ?_Xlen@_String_base@std@@QBEXXZ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment