mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-03 04:26:45 +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(); },
|
attempt([&] () { return createObject(); },
|
||||||
"failed to create Machine object");
|
"failed to create Machine object");
|
||||||
|
|
||||||
attempt([&] () { return (*this)->initFromSettings(virtualbox,
|
HRESULT const rc = (*this)->initFromSettings(virtualbox,
|
||||||
vbox_file_path.utf8,
|
vbox_file_path.utf8,
|
||||||
nullptr); },
|
nullptr);
|
||||||
"failed to init machine from settings");
|
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
|
* Add the machine to the VirtualBox::allMachines list
|
||||||
|
Loading…
Reference in New Issue
Block a user