Module: wine Branch: master Commit: 2f87a5d4590b5f601f63dd81146b6d07c6441deb URL: http://source.winehq.org/git/wine.git/?a=commit;h=2f87a5d4590b5f601f63dd8114...
Author: Piotr Caban piotr@codeweavers.com Date: Thu Mar 29 16:13:13 2012 +0200
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 2c635ed..0965716 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 9a582eb..27703a0 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 8c3ceb5..c774e98 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,