Correct exception handling
This commit is contained in:
parent
68dba196ba
commit
189003ef95
1 changed files with 5 additions and 1 deletions
|
|
@ -44,10 +44,14 @@ bool anbox::cmds::Launch::try_launch_activity(const std::shared_ptr<dbus::stub::
|
|||
try {
|
||||
DEBUG("Sending launch intent %s to Android ..", intent_);
|
||||
stub->launch(intent_, graphics::Rect::Invalid, stack_);
|
||||
} catch (std::exception &err) {
|
||||
} catch (const std::exception &err) {
|
||||
ERROR("Failed to launch activity: %s", err.what());
|
||||
return false;
|
||||
} catch (...) {
|
||||
ERROR("Failed to launch activity");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue