Commit b561d013 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

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

parent 6b7b6f45
...@@ -320,7 +320,6 @@ typedef enum __exception_type { ...@@ -320,7 +320,6 @@ typedef enum __exception_type {
EXCEPTION_BAD_CAST, EXCEPTION_BAD_CAST,
EXCEPTION_LOGIC_ERROR, EXCEPTION_LOGIC_ERROR,
EXCEPTION_OUT_OF_RANGE, EXCEPTION_OUT_OF_RANGE,
EXCEPTION_INVALID_ARGUMENT,
EXCEPTION_RUNTIME_ERROR, EXCEPTION_RUNTIME_ERROR,
EXCEPTION_FAILURE, EXCEPTION_FAILURE,
EXCEPTION_RANGE_ERROR, EXCEPTION_RANGE_ERROR,
......
...@@ -890,10 +890,15 @@ void __cdecl DECLSPEC_NORETURN _Xmem(void) ...@@ -890,10 +890,15 @@ void __cdecl DECLSPEC_NORETURN _Xmem(void)
/* ?_Xinvalid_argument@std@@YAXPBD@Z */ /* ?_Xinvalid_argument@std@@YAXPBD@Z */
/* ?_Xinvalid_argument@std@@YAXPEBD@Z */ /* ?_Xinvalid_argument@std@@YAXPEBD@Z */
void __cdecl _Xinvalid_argument(const char *str) void __cdecl DECLSPEC_NORETURN _Xinvalid_argument(const char *str)
{ {
exception_name name = EXCEPTION_NAME(str);
invalid_argument e;
TRACE("(%s)\n", debugstr_a(str)); TRACE("(%s)\n", debugstr_a(str));
throw_exception(EXCEPTION_INVALID_ARGUMENT, str);
MSVCP_invalid_argument_ctor(&e, name);
_CxxThrowException(&e, &invalid_argument_cxx_type);
} }
/* ?_Xlength_error@std@@YAXPBD@Z */ /* ?_Xlength_error@std@@YAXPBD@Z */
...@@ -1076,11 +1081,6 @@ void throw_exception(exception_type et, const char *str) ...@@ -1076,11 +1081,6 @@ void throw_exception(exception_type et, const char *str)
MSVCP_out_of_range_ctor(&e, name); MSVCP_out_of_range_ctor(&e, name);
_CxxThrowException(&e, &out_of_range_cxx_type); _CxxThrowException(&e, &out_of_range_cxx_type);
} }
case EXCEPTION_INVALID_ARGUMENT: {
invalid_argument e;
MSVCP_invalid_argument_ctor(&e, name);
_CxxThrowException(&e, &invalid_argument_cxx_type);
}
case EXCEPTION_RUNTIME_ERROR: { case EXCEPTION_RUNTIME_ERROR: {
runtime_error e; runtime_error e;
MSVCP_runtime_error_ctor(&e, name); MSVCP_runtime_error_ctor(&e, name);
......
...@@ -664,5 +664,6 @@ static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, cons ...@@ -664,5 +664,6 @@ static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, cons
#endif #endif
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*); void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
void __cdecl DECLSPEC_NORETURN _Xinvalid_argument(const char*);
void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*); void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
void __cdecl DECLSPEC_NORETURN _Xmem(void); void __cdecl DECLSPEC_NORETURN _Xmem(void);
...@@ -484,10 +484,8 @@ void __thiscall _String_base__Xran(const void/*_String_base*/ *this) ...@@ -484,10 +484,8 @@ void __thiscall _String_base__Xran(const void/*_String_base*/ *this)
/* ?_Xinvarg@_String_base@std@@SAXXZ */ /* ?_Xinvarg@_String_base@std@@SAXXZ */
void CDECL MSVCP__String_base_Xinvarg(void) void CDECL MSVCP__String_base_Xinvarg(void)
{ {
static const char msg[] = "invalid string argument";
TRACE("\n"); TRACE("\n");
throw_exception(EXCEPTION_INVALID_ARGUMENT, msg); _Xinvalid_argument("invalid string argument");
} }
......
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