Skip to content

Commit 847ba67

Browse files
committed
Revert unnecessary std::invalid_argument handling
WE2-479 Signed-off-by: Mart Somermaa <[email protected]>
1 parent 8a33114 commit 847ba67

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/controller/controller.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,6 @@ void Controller::run()
101101

102102
startCommandExecution();
103103

104-
} catch (const std::invalid_argument& exc) {
105-
if (isInStdinMode) {
106-
// Pass invalid argument message to the caller just in case it may be interested
107-
// The result will be {"invalid-argument" : message}
108-
// Command parameter is only used if exception will be raised during json creation
109-
writeResponseToStdOut(isInStdinMode, {{QStringLiteral("invalid-argument"), exc.what()}},
110-
"invalid-argument");
111-
// Exit directly here
112-
disposeUI();
113-
exit();
114-
return;
115-
}
116-
onCriticalFailure(exc.what());
117104
} catch (const std::exception& error) {
118105
onCriticalFailure(error.what());
119106
}

src/ui/webeiddialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,9 @@ QString WebEidDialog::getPin()
292292
// QString uses QAtomicPointer internally and is thread-safe.
293293
// There should be only single reference and this is transferred to the caller for safety
294294
QString ret = pin;
295-
// Cannot use eraseData because we have to force Qt copy-on-write
296-
pin.fill('\0');
297-
pin.clear();
295+
// Cannot use eraseData because we have to force Qt copy-on-write
296+
pin.fill('\0');
297+
pin.clear();
298298
return ret;
299299
}
300300

0 commit comments

Comments
 (0)