summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-07 06:40:09 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-07 06:40:09 -0500
commit1a43b2279195e845e370d08c78151a8188a67560 (patch)
tree301aa622cd096dc0e05bf7bb69ffd9c065794ba2
parent06f4c2786700121036ab02556a028e51573307fd (diff)
downloadfork-ledger-1a43b2279195e845e370d08c78151a8188a67560.tar.gz
fork-ledger-1a43b2279195e845e370d08c78151a8188a67560.tar.bz2
fork-ledger-1a43b2279195e845e370d08c78151a8188a67560.zip
Throw an error for unrecognized options in data files
-rw-r--r--src/textual.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 4b800ab2..8d4294a6 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -487,17 +487,8 @@ void instance_t::option_directive(char * line)
*p++ = '\0';
}
-#if 0
- if (! process_option(pathname.string(), line + 2, scope, p, line) &&
- ! dynamic_cast<session_t *>(&scope)) {
- if (std::strlen(line + 2) == 1)
- throw_(option_error, _("Illegal option -%1") << line + 2);
- else
- throw_(option_error, _("Illegal option --%1") << line + 2);
- }
-#else
- process_option(pathname.string(), line + 2, scope, p, line);
-#endif
+ if (! process_option(pathname.string(), line + 2, scope, p, line))
+ throw_(option_error, _("Illegal option --%1") << line + 2);
}
void instance_t::automated_xact_directive(char * line)