msvcp90: Introduce throw_range_error helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
503f3462c6
commit
93455491fc
|
@ -320,7 +320,6 @@ typedef enum __exception_type {
|
||||||
EXCEPTION_BAD_CAST,
|
EXCEPTION_BAD_CAST,
|
||||||
EXCEPTION_LOGIC_ERROR,
|
EXCEPTION_LOGIC_ERROR,
|
||||||
EXCEPTION_FAILURE,
|
EXCEPTION_FAILURE,
|
||||||
EXCEPTION_RANGE_ERROR,
|
|
||||||
} exception_type;
|
} exception_type;
|
||||||
void throw_exception(exception_type, const char *);
|
void throw_exception(exception_type, const char *);
|
||||||
|
|
||||||
|
|
|
@ -475,8 +475,7 @@ void __thiscall _vector_base_v4__Internal_throw_exception(void/*_vector_base_v4*
|
||||||
switch(idx) {
|
switch(idx) {
|
||||||
case 0: _Xout_of_range("Index out of range");
|
case 0: _Xout_of_range("Index out of range");
|
||||||
case 1: _Xout_of_range("Index out of segments table range");
|
case 1: _Xout_of_range("Index out of segments table range");
|
||||||
case 2: throw_exception(EXCEPTION_RANGE_ERROR,
|
case 2: throw_range_error("Index is inside segment which failed to be allocated");
|
||||||
"Index is inside segment which failed to be allocated");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1091,14 +1091,19 @@ void throw_exception(exception_type et, const char *str)
|
||||||
MSVCP_failure_ctor(&e, name);
|
MSVCP_failure_ctor(&e, name);
|
||||||
_CxxThrowException(&e, &failure_cxx_type);
|
_CxxThrowException(&e, &failure_cxx_type);
|
||||||
}
|
}
|
||||||
case EXCEPTION_RANGE_ERROR: {
|
|
||||||
range_error e;
|
|
||||||
MSVCP_range_error_ctor(&e, name);
|
|
||||||
_CxxThrowException(&e, &range_error_cxx_type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Internal: throws range_error exception */
|
||||||
|
void DECLSPEC_NORETURN throw_range_error(const char *str)
|
||||||
|
{
|
||||||
|
exception_name name = EXCEPTION_NAME(str);
|
||||||
|
range_error e;
|
||||||
|
|
||||||
|
MSVCP_range_error_ctor(&e, name);
|
||||||
|
_CxxThrowException(&e, &range_error_cxx_type);
|
||||||
|
}
|
||||||
|
|
||||||
void init_exception(void *base)
|
void init_exception(void *base)
|
||||||
{
|
{
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
|
|
@ -669,3 +669,4 @@ void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
|
||||||
void __cdecl DECLSPEC_NORETURN _Xmem(void);
|
void __cdecl DECLSPEC_NORETURN _Xmem(void);
|
||||||
void __cdecl DECLSPEC_NORETURN _Xout_of_range(const char*);
|
void __cdecl DECLSPEC_NORETURN _Xout_of_range(const char*);
|
||||||
void __cdecl DECLSPEC_NORETURN _Xruntime_error(const char*);
|
void __cdecl DECLSPEC_NORETURN _Xruntime_error(const char*);
|
||||||
|
void DECLSPEC_NORETURN throw_range_error(const char*);
|
||||||
|
|
Loading…
Reference in New Issue