diff options
author | vng <viktor.govako@gmail.com> | 2011-05-29 21:30:46 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:18:22 +0300 |
commit | d226b5726dc8890d9bac71d0e7ddb93359d95184 (patch) | |
tree | 14f16538f6e2a9641147d2fa37e278ad94687491 /base/base.cpp | |
parent | 5db477d1f2577838cf1ace96f0ba87ce8ebcc8cd (diff) |
Fix assertions in Release.
Do not catch all exception in main.
Diffstat (limited to 'base/base.cpp')
-rw-r--r-- | base/base.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/base.cpp b/base/base.cpp index d4f88a7bef..9b2f189af1 100644 --- a/base/base.cpp +++ b/base/base.cpp @@ -1,8 +1,11 @@ #include "SRC_FIRST.hpp" #include "assert.hpp" + #include "../std/target_os.hpp" #include "../std/iostream.hpp" + #include <cassert> +#include <exception> #ifdef OMIM_OS_BADA #include <FBaseSys.h> @@ -15,10 +18,17 @@ namespace my #ifdef OMIM_OS_BADA AppLog("ASSERT FAILED%s:%d:%s", srcPoint.FileName(), srcPoint.Line(), msg.c_str()); AppAssert(false); + #else std::cerr << "ASSERT FAILED\n" << srcPoint.FileName() << ":" << srcPoint.Line() << "\n" << msg << endl; + +#ifdef DEBUG assert(false); +#else + throw std::exception(msg.c_str()); +#endif + #endif } |