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 {
|
try {
|
||||||
DEBUG("Sending launch intent %s to Android ..", intent_);
|
DEBUG("Sending launch intent %s to Android ..", intent_);
|
||||||
stub->launch(intent_, graphics::Rect::Invalid, stack_);
|
stub->launch(intent_, graphics::Rect::Invalid, stack_);
|
||||||
} catch (std::exception &err) {
|
} catch (const std::exception &err) {
|
||||||
ERROR("Failed to launch activity: %s", err.what());
|
ERROR("Failed to launch activity: %s", err.what());
|
||||||
return false;
|
return false;
|
||||||
|
} catch (...) {
|
||||||
|
ERROR("Failed to launch activity");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue