summaryrefslogtreecommitdiff
path: root/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:08:42 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:31 -0400
commit0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (patch)
tree750d64f6817282a6f4744058f73164a2996f6b03 /report.cc
parentd01629148383261d7944e91fd2ac67b334a6834d (diff)
downloadfork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.gz
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.bz2
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.zip
Restructured the code to use the new utility code in utils.h.
Diffstat (limited to 'report.cc')
-rw-r--r--report.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/report.cc b/report.cc
index e17bebe3..019bc669 100644
--- a/report.cc
+++ b/report.cc
@@ -22,7 +22,7 @@ void report_t::apply_transforms(xml::document_t * document)
void report_t::abbrev(value_t& result, xml::xpath_t::scope_t * locals)
{
if (locals->args.size() < 2)
- throw new error("usage: abbrev(STRING, WIDTH [, STYLE, ABBREV_LEN])");
+ throw_(exception, "usage: abbrev(STRING, WIDTH [, STYLE, ABBREV_LEN])");
string str = locals->args[0].to_string();
long wid = locals->args[1];
@@ -41,7 +41,7 @@ void report_t::abbrev(value_t& result, xml::xpath_t::scope_t * locals)
void report_t::ftime(value_t&, xml::xpath_t::scope_t * locals)
{
if (locals->args.size() < 1)
- throw new error("usage: ftime(DATE [, DATE_FORMAT])");
+ throw_(exception, "usage: ftime(DATE [, DATE_FORMAT])");
moment_t date = locals->args[0].to_datetime();