Fix catching by value
Pointed out by LGTM. Change-Id: I223655c728305f6f45b3738553da5b7d7a69e8c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2134 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
654135466f
commit
992ae400ec
@@ -73,25 +73,25 @@ UpdateAction::Perform(update_type action_request)
|
||||
throw BException(B_TRANSLATE(
|
||||
"Invalid update type, cannot continue with updates"));
|
||||
|
||||
} catch (BFatalErrorException ex) {
|
||||
} catch (BFatalErrorException& ex) {
|
||||
fUpdateManager->FinalUpdate(B_TRANSLATE("Updates did not complete"),
|
||||
ex.Message());
|
||||
return ex.Error();
|
||||
} catch (BAbortedByUserException ex) {
|
||||
} catch (BAbortedByUserException& ex) {
|
||||
if (fVerbose)
|
||||
fprintf(stderr, "Updates aborted by user: %s\n",
|
||||
ex.Message().String());
|
||||
// No need for a final message since user initiated cancel request
|
||||
be_app->PostMessage(kMsgFinalQuit);
|
||||
return B_OK;
|
||||
} catch (BNothingToDoException ex) {
|
||||
} catch (BNothingToDoException& ex) {
|
||||
if (fVerbose)
|
||||
fprintf(stderr, "Nothing to do while updating packages : %s\n",
|
||||
ex.Message().String());
|
||||
fUpdateManager->FinalUpdate(B_TRANSLATE("No updates available"),
|
||||
B_TRANSLATE("There were no updates found."));
|
||||
return B_OK;
|
||||
} catch (BException ex) {
|
||||
} catch (BException& ex) {
|
||||
if (fVerbose)
|
||||
fprintf(stderr, B_TRANSLATE(
|
||||
"Exception occurred while updating packages : %s\n"),
|
||||
|
||||
Reference in New Issue
Block a user