summaryrefslogtreecommitdiff
path: root/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-31 06:24:45 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-31 06:24:45 -0400
commit99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (patch)
tree44a553891a9aaa148084d8e011b2d326401343e9 /value.cc
parent8afd926a27af55862ce360970e05d747f249a0da (diff)
downloadfork-ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.gz
fork-ledger-99313ebc6c3779f692f9f1bd70cc69a236f5eb78.tar.bz2
fork-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 'value.cc')
-rw-r--r--value.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/value.cc b/value.cc
index a6969af9..8edc5df1 100644
--- a/value.cc
+++ b/value.cc
@@ -1378,7 +1378,7 @@ value_t value_t::annotated_tag() const
optional<string> temp = as_amount().annotation_details().tag;
if (! temp)
return false;
- return value_t(*temp, true);
+ return string_value(*temp);
}
case STRING:
@@ -1679,15 +1679,4 @@ bool value_t::valid() const
return true;
}
-void value_context::describe(std::ostream& out) const throw()
-{
- if (! desc.empty())
- out << desc << std::endl;
-
- out << std::right;
- out.width(20);
- bal.print(out);
- out << std::endl;
-}
-
} // namespace ledger