summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-08-25 04:43:59 +0200
committer angelosa <salese_corp_ltd@email.it>2017-08-25 04:44:46 +0200
commit6a3c352a8df988568d29fa11f0c2ab2d031c10d8 (patch)
treef12cf15f0b94eef66d9c2bf45c2d8a8795633846
parentebf67199ce514549e2b3123d9835314da4bca4a5 (diff)
ioport.cpp: return explicit "file not found" error if inp file isn't found on playback, added error code number to any other error found [Angelo Salese]
-rw-r--r--src/emu/ioport.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 6ffff130915..85c41d56499 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -2543,7 +2543,14 @@ time_t ioport_manager::playback_init()
// open the playback file
osd_file::error filerr = m_playback_file.open(filename);
- assert_always(filerr == osd_file::error::NONE, "Failed to open file for playback");
+
+ // return an explicit error if file isn't found in given path
+ if(filerr == osd_file::error::NOT_FOUND)
+ fatalerror("Input file %s not found\n",filename);
+
+ // TODO: bail out any other error laconically for now
+ if(filerr != osd_file::error::NONE)
+ fatalerror("Failed to open file %s for playback (code error=%d)\n",filename,int(filerr));
// read the header and verify that it is a modern version; if not, print an error
inp_header header;