diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-10-16 16:16:32 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-10-16 16:16:32 +0200 |
| commit | f8abbfbb4487ad3630add33f61716ed01ca0bdf6 (patch) | |
| tree | f74c16dd1d7f2abd496cd3412a030ca1a590aa70 /src/assert.hh | |
| parent | 214baf4cdd49b52b56cd000e45a3f222120d4db2 (diff) | |
assert: use xmessage to block on assert failed
Diffstat (limited to 'src/assert.hh')
| -rw-r--r-- | src/assert.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/assert.hh b/src/assert.hh index 975ddca1..0ec5db90 100644 --- a/src/assert.hh +++ b/src/assert.hh @@ -15,6 +15,8 @@ private: String m_message; }; +void on_assert_failed(const String& message); + } #define STRINGIFY(X) #X @@ -27,6 +29,6 @@ private: #define assert(condition) \ if (not (condition)) \ - throw assert_failed("assert failed \"" #condition "\" at " __FILE__ ":" TOSTRING(__LINE__)) + on_assert_failed("assert failed \"" #condition "\" at " __FILE__ ":" TOSTRING(__LINE__)) #endif // assert_hh_INCLUDED |
