diff --git a/src/goto-instrument/goto_instrument_parse_options.cpp b/src/goto-instrument/goto_instrument_parse_options.cpp index 186e328bf90..840b395ad9a 100644 --- a/src/goto-instrument/goto_instrument_parse_options.cpp +++ b/src/goto-instrument/goto_instrument_parse_options.cpp @@ -16,6 +16,7 @@ Author: Daniel Kroening, kroening@kroening.com #include #include +#include #include #include #include @@ -824,6 +825,14 @@ int goto_instrument_parse_optionst::doit() else return CPROVER_EXIT_SUCCESS; } + else if(cmdline.args.size() < 2) + { + throw invalid_command_line_argument_exceptiont( + "Invalid number of positional arguments passed", + "[in] [out]", + "goto-instrument needs one input and one output file, aside from other " + "flags"); + } help(); return CPROVER_EXIT_USAGE_ERROR;