mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
vbox6: display cause of error on failed 'initFromSettings'
Use 'ErrorInfoKeeper' to retrieve current error from XPCOM service and log message. fixes #4473
This commit is contained in:
parent
f91ece78e0
commit
2a47379ab5
@ -149,10 +149,19 @@ struct Main : Event_handler
|
||||
attempt([&] () { return createObject(); },
|
||||
"failed to create Machine object");
|
||||
|
||||
attempt([&] () { return (*this)->initFromSettings(virtualbox,
|
||||
vbox_file_path.utf8,
|
||||
nullptr); },
|
||||
"failed to init machine from settings");
|
||||
HRESULT const rc = (*this)->initFromSettings(virtualbox,
|
||||
vbox_file_path.utf8,
|
||||
nullptr);
|
||||
if (FAILED(rc)) {
|
||||
Genode::error("failed to init machine from settings");
|
||||
/*
|
||||
* Use keeper to retrieve current error message
|
||||
*/
|
||||
ErrorInfoKeeper eik;
|
||||
Bstr const &text = eik.getText();
|
||||
Genode::log(Utf8Str(text.raw()).c_str());
|
||||
throw Fatal();
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the machine to the VirtualBox::allMachines list
|
||||
|
Loading…
Reference in New Issue
Block a user