Commit 2f87a5d4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added support for exception reraising in ios_base::clear.

parent 1aeb4dcd
......@@ -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");
this->state = state & IOSTATE_mask;
if(!(this->state & this->except))
return;
}
this->state = state & IOSTATE_mask;
if(this->state & this->except & IOSTATE_eofbit)
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,
......
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