msvcp90: Don't use throw_exception helper for length_error exception.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c306c527e7
commit
6b7b6f45e1
|
@ -485,4 +485,5 @@ typedef struct {
|
||||||
} complex_double;
|
} complex_double;
|
||||||
|
|
||||||
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
|
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
|
||||||
|
void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
|
||||||
void __cdecl DECLSPEC_NORETURN _Xmem(void);
|
void __cdecl DECLSPEC_NORETURN _Xmem(void);
|
||||||
|
|
|
@ -55,10 +55,8 @@ void __cdecl _Xran(void)
|
||||||
/* ?_Xlen@std@@YAXXZ */
|
/* ?_Xlen@std@@YAXXZ */
|
||||||
void __cdecl _Xlen(void)
|
void __cdecl _Xlen(void)
|
||||||
{
|
{
|
||||||
static const char msg[] = "string too long";
|
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
throw_exception(EXCEPTION_LENGTH_ERROR, msg);
|
_Xlength_error("string too long");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
|
/* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
|
||||||
|
|
|
@ -319,7 +319,6 @@ typedef enum __exception_type {
|
||||||
EXCEPTION,
|
EXCEPTION,
|
||||||
EXCEPTION_BAD_CAST,
|
EXCEPTION_BAD_CAST,
|
||||||
EXCEPTION_LOGIC_ERROR,
|
EXCEPTION_LOGIC_ERROR,
|
||||||
EXCEPTION_LENGTH_ERROR,
|
|
||||||
EXCEPTION_OUT_OF_RANGE,
|
EXCEPTION_OUT_OF_RANGE,
|
||||||
EXCEPTION_INVALID_ARGUMENT,
|
EXCEPTION_INVALID_ARGUMENT,
|
||||||
EXCEPTION_RUNTIME_ERROR,
|
EXCEPTION_RUNTIME_ERROR,
|
||||||
|
|
|
@ -898,10 +898,15 @@ void __cdecl _Xinvalid_argument(const char *str)
|
||||||
|
|
||||||
/* ?_Xlength_error@std@@YAXPBD@Z */
|
/* ?_Xlength_error@std@@YAXPBD@Z */
|
||||||
/* ?_Xlength_error@std@@YAXPEBD@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));
|
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 */
|
/* ?_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);
|
MSVCP_logic_error_ctor(&e, name);
|
||||||
_CxxThrowException(&e, &logic_error_cxx_type);
|
_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: {
|
case EXCEPTION_OUT_OF_RANGE: {
|
||||||
out_of_range e;
|
out_of_range e;
|
||||||
MSVCP_out_of_range_ctor(&e, name);
|
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
|
#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 _Xlength_error(const char*);
|
||||||
void __cdecl DECLSPEC_NORETURN _Xmem(void);
|
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 */
|
/* ?_Xlen@_String_base@std@@SAXXZ */
|
||||||
void CDECL MSVCP__String_base_Xlen(void)
|
void CDECL MSVCP__String_base_Xlen(void)
|
||||||
{
|
{
|
||||||
static const char msg[] = "string too long";
|
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
throw_exception(EXCEPTION_LENGTH_ERROR, msg);
|
_Xlength_error("string too long");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ?_Xlen@_String_base@std@@QBEXXZ */
|
/* ?_Xlen@_String_base@std@@QBEXXZ */
|
||||||
|
|
Loading…
Reference in New Issue