From 2f87a5d4590b5f601f63dd81146b6d07c6441deb Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 29 Mar 2012 16:13:13 +0200 Subject: [PATCH] msvcp90: Added support for exception reraising in ios_base::clear. --- dlls/msvcp90/exception.c | 2 ++ dlls/msvcp90/ios.c | 10 +++++----- dlls/msvcp90/msvcp90.h | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index 2c635ed9fab..09657165c89 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -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); diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 9a582ebfa97..27703a05184 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -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"); diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 8c3ceb5d61f..c774e9825bf 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -157,6 +157,7 @@ typedef struct __exception /* Internal: throws selected exception */ typedef enum __exception_type { + EXCEPTION_RERAISE, EXCEPTION, EXCEPTION_BAD_ALLOC, EXCEPTION_LOGIC_ERROR, -- 2.11.4.GIT