File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -472,5 +472,18 @@ namespace binary {
472
472
473
473
} // namespace binary
474
474
} // namespace jsoncons
475
+ // allow to disable exceptions
476
+
477
+ #if !defined(JSONCONS_NO_EXCEPTIONS)
478
+ #define JSONCONS_THROW (exception ) throw exception
479
+ #define JSONCONS_RETHROW throw
480
+ #define JSONCONS_TRY try
481
+ #define JSONCONS_CATCH (exception ) catch (exception )
482
+ #else
483
+ #define JSONCONS_THROW (exception ) std::terminate()
484
+ #define JSONCONS_RETHROW std::terminate ()
485
+ #define JSONCONS_TRY if (true )
486
+ #define JSONCONS_CATCH (exception ) if (false )
487
+ #endif
475
488
476
489
#endif // JSONCONS_CONFIG_COMPILER_SUPPORT_HPP
Original file line number Diff line number Diff line change 17
17
18
18
#include < jsoncons/config/compiler_support.hpp>
19
19
20
- // allow to disable exceptions
21
- #if !defined(JSONCONS_NO_EXCEPTIONS)
22
- #define JSONCONS_THROW (exception ) throw exception
23
- #define JSONCONS_RETHROW throw
24
- #define JSONCONS_TRY try
25
- #define JSONCONS_CATCH (exception ) catch (exception )
26
- #else
27
- #define JSONCONS_THROW (exception ) std::terminate()
28
- #define JSONCONS_RETHROW std::terminate ()
29
- #define JSONCONS_TRY if (true )
30
- #define JSONCONS_CATCH (exception ) if (false )
31
- #endif
32
-
33
20
namespace jsoncons {
34
21
35
22
class assertion_error : public std ::runtime_error
You can’t perform that action at this time.
0 commit comments