diff options
author | 2023-04-08 02:38:31 +1000 | |
---|---|---|
committer | 2023-04-08 02:38:31 +1000 | |
commit | 2b424f5a8090961db0d8224f755b2dff7c9e9a8c (patch) | |
tree | 97da90487cbdefff24bcccc57f8a874b9ac8c929 /src/osd/modules/debugger/qt/mainwindow.cpp | |
parent | 9bda81283d963ee04dba90901f89c6f264ed3f3b (diff) |
Restored ability of for image devices to report specific error messages.
Restores ability to give specific/detailed messages removed in
6f7e4141ea14acaaf9cb973c66788fabb3457023 while pandering to obsession
with single return value.
Moved responsibility for displaying the error message in the UI to the
caller rather than device_image_interface, and made
device_image_interface always log the error along with the full path and
error condition content.
Gave several image devices more detailed error messages. Added some
FIXME comments for apparent bugs.
Diffstat (limited to 'src/osd/modules/debugger/qt/mainwindow.cpp')
-rw-r--r-- | src/osd/modules/debugger/qt/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/modules/debugger/qt/mainwindow.cpp b/src/osd/modules/debugger/qt/mainwindow.cpp index f707804537d..5e97376aa7d 100644 --- a/src/osd/modules/debugger/qt/mainwindow.cpp +++ b/src/osd/modules/debugger/qt/mainwindow.cpp @@ -375,10 +375,10 @@ void MainWindow::mountImage(bool changedTo) QDir::currentPath(), tr("All files (*.*)")); - std::error_condition err = img->load(filename.toUtf8().data()); + auto [err, message] = img->load(filename.toUtf8().data()); if (err) { - m_machine.debugger().console().printf("Image could not be mounted: %s\n", err.message()); + m_machine.debugger().console().printf("Image could not be mounted: %s\n", !message.empty() ? message : err.message()); return; } |