msvcp90: Added support for exception reraising in ios_base::clear.
This commit is contained in:
parent
1aeb4dcd41
commit
2f87a5d459
|
@ -684,6 +684,8 @@ void throw_exception(exception_type et, const char *str)
|
|||
const char *addr = str;
|
||||
|
||||
switch(et) {
|
||||
case EXCEPTION_RERAISE:
|
||||
_CxxThrowException(NULL, NULL);
|
||||
case EXCEPTION: {
|
||||
exception e;
|
||||
MSVCP_exception_ctor(&e, &addr);
|
||||
|
|
|
@ -1942,13 +1942,13 @@ void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP
|
|||
{
|
||||
TRACE("(%p %x %x)\n", this, state, reraise);
|
||||
|
||||
if(reraise) {
|
||||
FIXME("reraise is not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
this->state = state & IOSTATE_mask;
|
||||
if(this->state & this->except & IOSTATE_eofbit)
|
||||
if(!(this->state & this->except))
|
||||
return;
|
||||
|
||||
if(reraise)
|
||||
throw_exception(EXCEPTION_RERAISE, NULL);
|
||||
else if(this->state & this->except & IOSTATE_eofbit)
|
||||
throw_exception(EXCEPTION_FAILURE, "eofbit is set");
|
||||
else if(this->state & this->except & IOSTATE_failbit)
|
||||
throw_exception(EXCEPTION_FAILURE, "failbit is set");
|
||||
|
|
|
@ -157,6 +157,7 @@ typedef struct __exception
|
|||
|
||||
/* Internal: throws selected exception */
|
||||
typedef enum __exception_type {
|
||||
EXCEPTION_RERAISE,
|
||||
EXCEPTION,
|
||||
EXCEPTION_BAD_ALLOC,
|
||||
EXCEPTION_LOGIC_ERROR,
|
||||
|
|
Loading…
Reference in New Issue