From 2b424f5a8090961db0d8224f755b2dff7c9e9a8c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 8 Apr 2023 02:38:31 +1000 Subject: 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. --- src/osd/modules/debugger/qt/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/osd/modules/debugger/qt/mainwindow.cpp') 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; } -- cgit v1.2.3