Skip to content

Commit 751c841

Browse files
Lauris Kaplinskimrts
authored andcommitted
Send meaningful json and exit directly if invalid argument is encountered in stdin mode
1 parent be414ca commit 751c841

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/controller/controller.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ void Controller::run()
108108
// Command parameter is only used if exception will be raised during json creation
109109
writeResponseToStdOut(isInStdinMode, {{QStringLiteral("invalid-argument"), exc.what()}},
110110
"invalid-argument");
111+
// Exit directly here
112+
disposeUI();
113+
exit();
111114
}
112115
onCriticalFailure(exc.what());
113116
} catch (const std::exception& error) {

0 commit comments

Comments
 (0)