summaryrefslogtreecommitdiff
path: root/src/option.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-30 11:22:08 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:34 -0400
commit21af83013f3b1bae511a61b9e27224ab3de235c1 (patch)
treebf0eea45f33e7e269220adc6ce37815f7bc14a3f /src/option.cc
parent3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba (diff)
downloadfork-ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.gz
fork-ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.bz2
fork-ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.zip
Did more work on the utility code.
Diffstat (limited to 'src/option.cc')
-rw-r--r--src/option.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/option.cc b/src/option.cc
index 222baf92..64672211 100644
--- a/src/option.cc
+++ b/src/option.cc
@@ -153,21 +153,21 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
std::auto_ptr<xml::xpath_t::op_t> opt(find_option(scope, name));
if (! opt.get())
- throw_(option_exception, "illegal option --" << name);
+ throw_(option_error, "illegal option --" << name);
xml::xpath_t::functor_t * def = opt->functor_obj();
if (! def)
- throw_(option_exception, "illegal option --" << name);
+ throw_(option_error, "illegal option --" << name);
if (def->wants_args && value == NULL) {
value = *++i;
if (value == NULL)
- throw_(option_exception, "missing option argument for --" << name);
+ throw_(option_error, "missing option argument for --" << name);
}
process_option(def, scope, value);
}
else if ((*i)[1] == '\0') {
- throw_(option_exception, "illegal option -");
+ throw_(option_error, "illegal option -");
}
else {
std::list<xml::xpath_t::op_t *> option_queue;
@@ -176,11 +176,11 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
for (char c = (*i)[x]; c != '\0'; x++, c = (*i)[x]) {
xml::xpath_t::op_t * opt = find_option(scope, c);
if (! opt)
- throw_(option_exception, "illegal option -" << c);
+ throw_(option_error, "illegal option -" << c);
xml::xpath_t::functor_t * def = opt->functor_obj();
if (! def)
- throw_(option_exception, "illegal option -" << c);
+ throw_(option_error, "illegal option -" << c);
option_queue.push_back(opt);
}
@@ -197,7 +197,7 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
if (def->wants_args) {
value = *++i;
if (value == NULL)
- throw_(option_exception, "missing option argument for -" <<
+ throw_(option_error, "missing option argument for -" <<
#if 0
def->short_opt
#else