diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-31 06:24:45 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-31 06:24:45 -0400 |
commit | 99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (patch) | |
tree | 44a553891a9aaa148084d8e011b2d326401343e9 /utils.cc | |
parent | 8afd926a27af55862ce360970e05d747f249a0da (diff) | |
download | ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.gz ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.bz2 ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.zip |
Revised the way that exceptions are thrown around. Instead of context being a
complicated string of pointers, it's now just a global block of text that gets
appended to as the error is being thrown up, and can be displayed at the catch
point if desired. There are almost no cases where a thrown exception will not
result in an error message being displayed to the user.
Diffstat (limited to 'utils.cc')
-rw-r--r-- | utils.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -40,7 +40,7 @@ namespace ledger { -DECLARE_EXCEPTION(fatal, assertion_failed); +DECLARE_EXCEPTION(assertion_failed, std::logic_error); void debug_assert(const string& reason, const string& func, @@ -649,8 +649,8 @@ void finish_timer(const char * name) namespace ledger { -std::ostringstream _exc_buffer; -/*ptr_list<context> context_stack;*/ +std::ostringstream _desc_buffer; +std::ostringstream _ctxt_buffer; } // namespace ledger @@ -666,9 +666,7 @@ path expand_path(const path& pathname) if (pathname.empty()) return pathname; -#if 1 - return pathname; -#else +#if 0 // jww (2007-04-30): I need to port this code to use // boost::filesystem::path const char * pfx = NULL; @@ -711,6 +709,8 @@ path expand_path(const path& pathname) result += pathname.substr(pos + 1); return result; +#else + return pathname; #endif } |