summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/chdman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/chdman.c')
-rw-r--r--src/tools/chdman.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c
index e9919bc9625..a824c701d74 100644
--- a/src/tools/chdman.c
+++ b/src/tools/chdman.c
@@ -2923,8 +2923,14 @@ int CLIB_DECL main(int argc, char *argv[])
(*s_commands[cmdnum].handler)(parameters);
return 0;
}
+ catch (chd_error &err)
+ {
+ fprintf(stderr, "CHD error occured (main): %s\n", chd_file::error_string(err));
+ return 1;
+ }
catch (fatal_error &err)
{
+ fprintf(stderr, "Fatal error occured: %d\n", err.error());
return err.error();
}
catch (std::exception& ex)