CmdExport: Throw an exception when the report is not found
The Context::getContext ().error only issues a log message, but allows the execution of the program. In order to interrupt the execution, an exception must be raised.
This commit is contained in:
@@ -71,7 +71,7 @@ int CmdExport::execute (std::string& output)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selectedReport.empty ()) {
|
if (selectedReport.empty ()) {
|
||||||
Context::getContext ().error("Unable to find report that matches '" + words[0] + "'.");
|
throw format("Unable to find report that matches '{1}'.", words[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user