diff options
Diffstat (limited to 'lib/common/Box.h')
-rw-r--r-- | lib/common/Box.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/common/Box.h b/lib/common/Box.h index 1124a062..77f7d1f4 100644 --- a/lib/common/Box.h +++ b/lib/common/Box.h @@ -103,18 +103,25 @@ #define THROW_EXCEPTION(type, subtype) \ { \ - OPTIONAL_DO_BACKTRACE \ - BOX_WARNING("Exception thrown: " #type "(" #subtype ") " \ - "at " __FILE__ "(" << __LINE__ << ")") \ + if(!HideExceptionMessageGuard::ExceptionsHidden()) \ + { \ + OPTIONAL_DO_BACKTRACE \ + BOX_WARNING("Exception thrown: " \ + #type "(" #subtype ") " \ + "at " __FILE__ "(" << __LINE__ << ")") \ + } \ throw type(type::subtype); \ } #define THROW_EXCEPTION_MESSAGE(type, subtype, message) \ { \ - OPTIONAL_DO_BACKTRACE \ - BOX_WARNING("Exception thrown: " #type "(" #subtype ") " \ - " (" message ") at " \ - __FILE__ "(" << __LINE__ << ")") \ + if(!HideExceptionMessageGuard::ExceptionsHidden()) \ + { \ + OPTIONAL_DO_BACKTRACE \ + BOX_WARNING("Exception thrown: " \ + #type "(" #subtype ") (" message ") at " \ + __FILE__ "(" << __LINE__ << ")") \ + } \ throw type(type::subtype, message); \ } |