summaryrefslogtreecommitdiff
path: root/src/interactive.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 22:25:10 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 01:03:49 -0400
commitdcdd9c4a5630db5eaf9fe20ad391c60dc7209960 (patch)
treec6cd188c815a33662cfa2099f483049d144a96ad /src/interactive.cc
parent1bc5b894dfd9412a60c4db16e9a4e49ddddad5fd (diff)
downloadledger-dcdd9c4a5630db5eaf9fe20ad391c60dc7209960.tar.gz
ledger-dcdd9c4a5630db5eaf9fe20ad391c60dc7209960.tar.bz2
ledger-dcdd9c4a5630db5eaf9fe20ad391c60dc7209960.zip
If a type context exists, confirm the result matches
Diffstat (limited to 'src/interactive.cc')
-rw-r--r--src/interactive.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interactive.cc b/src/interactive.cc
index 54c7fd6c..b95057dd 100644
--- a/src/interactive.cc
+++ b/src/interactive.cc
@@ -169,15 +169,14 @@ void interactive_t::verify_arguments() const
DEBUG("interactive.verify", "Remaining args are optional");
if (wrong_arg) {
- throw_(std::logic_error,
- _("Expected %1 for argument %2, but received %3")
- << label << offset << vlabel);
+ throw_(calc_error, _("Expected %1 for argument %2, but received %3")
+ << label << offset << vlabel);
}
else if (*p && ! optional && ! next_arg) {
- throw_(std::logic_error, _("Too few arguments to function"));
+ throw_(calc_error, _("Too few arguments to function"));
}
else if (! *p && next_arg) {
- throw_(std::logic_error, _("Too many arguments to function"));
+ throw_(calc_error, _("Too many arguments to function"));
}
}