diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/precmd.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/precmd.cc b/src/precmd.cc index 8ca27fd8..663b638d 100644 --- a/src/precmd.cc +++ b/src/precmd.cc @@ -96,10 +96,8 @@ namespace { value_t parse_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: parse TEXT")); - return 1L; - } report_t& report(find_scope<report_t>(args)); std::ostream& out(report.output_stream); @@ -145,10 +143,8 @@ value_t eval_command(call_scope_t& args) value_t format_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: format TEXT")); - return 1L; - } report_t& report(find_scope<report_t>(args)); std::ostream& out(report.output_stream); @@ -174,10 +170,8 @@ value_t format_command(call_scope_t& args) value_t period_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: period TEXT")); - return 1L; - } report_t& report(find_scope<report_t>(args)); std::ostream& out(report.output_stream); |