diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-30 11:22:08 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:34 -0400 |
commit | 21af83013f3b1bae511a61b9e27224ab3de235c1 (patch) | |
tree | bf0eea45f33e7e269220adc6ce37815f7bc14a3f /src/utils.cc | |
parent | 3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba (diff) | |
download | ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.gz ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.bz2 ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.zip |
Did more work on the utility code.
Diffstat (limited to 'src/utils.cc')
-rw-r--r-- | src/utils.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils.cc b/src/utils.cc index afa0b7a8..f37ec650 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -10,6 +10,8 @@ namespace ledger { +DECLARE_EXCEPTION(assertion_failed); + void debug_assert(const string& reason, const string& func, const string& file, @@ -18,7 +20,7 @@ void debug_assert(const string& reason, std::ostringstream buf; buf << "Assertion failed in \"" << file << "\", line " << line << ": " << reason; - throw exception(buf.str(), context()); + throw assertion_failed(buf.str()); } } // namespace ledger @@ -618,6 +620,7 @@ void finish_timer(const char * name) namespace ledger { std::ostringstream _exc_buffer; +ptr_list<context> context_stack; } // namespace ledger |