summaryrefslogtreecommitdiff
path: root/commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-29 05:10:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-29 05:59:38 -0400
commit4518ea95408e2d5fe90a87159b88bb41734ec1dc (patch)
tree3026169803aaea580d8b452cb9bb8a569c92fb2a /commodity.cc
parent63039ade9209bced70b3e4dbb673ad90286d310a (diff)
downloadledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.tar.gz
ledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.tar.bz2
ledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.zip
Value expression architecture is now rewritten, but the functionality of the
old system (for example, the meaning of 'a') has yet to be restored. In the new scheme, this will be done by definition a function outside of the value expression logic, rather than the tight coupling between journal innards and value expressions that occurred in 2.x.
Diffstat (limited to 'commodity.cc')
-rw-r--r--commodity.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/commodity.cc b/commodity.cc
index 0a62a861..173ebbc8 100644
--- a/commodity.cc
+++ b/commodity.cc
@@ -40,7 +40,6 @@
*/
#include "amount.h"
-#include "parser.h" // for parsing utility functions
namespace ledger {
@@ -248,7 +247,7 @@ void commodity_t::parse_symbol(char *& p, string& symbol)
if (*p == '"') {
char * q = std::strchr(p + 1, '"');
if (! q)
- throw_(parse_error, "Quoted commodity symbol lacks closing quote");
+ throw_(amount_error, "Quoted commodity symbol lacks closing quote");
symbol = string(p + 1, 0, q - p - 1);
p = q + 2;
} else {
@@ -260,7 +259,7 @@ void commodity_t::parse_symbol(char *& p, string& symbol)
p += symbol.length();
}
if (symbol.empty())
- throw_(parse_error, "Failed to parse commodity");
+ throw_(amount_error, "Failed to parse commodity");
}
bool commodity_t::valid() const