Skip to content

Commit

Permalink
Send meaningful json and exit directly if invalid argument is encount…
Browse files Browse the repository at this point in the history
…ered in stdin mode
  • Loading branch information
Lauris Kaplinski committed Aug 12, 2024
1 parent e42c67e commit f0deea1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controller/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ void Controller::run()
// Command parameter is only used if exception will be raised during json creation
writeResponseToStdOut(isInStdinMode, {{QStringLiteral("invalid-argument"), exc.what()}},
"invalid-argument");
// Exit directly here
disposeUI();
exit();
}
onCriticalFailure(exc.what());
} catch (const std::exception& error) {
Expand Down

0 comments on commit f0deea1

Please sign in to comment.