diff tools/xm2jss.c @ 2565:d56a0e86067a

Improve error handling.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 28 Feb 2022 11:49:58 +0200
parents 7151597d8ec6
children 9807ae37ad69
line wrap: on
line diff
--- a/tools/xm2jss.c	Mon Feb 28 10:18:38 2022 +0200
+++ b/tools/xm2jss.c	Mon Feb 28 11:49:58 2022 +0200
@@ -1307,13 +1307,14 @@
     // Parse arguments
     if (!dmArgsProcess(argc, argv, optList, optListN,
         argHandleOpt, argHandleFile, OPTH_BAILOUT))
-        exit(1);
+        goto out;
 
     // Check arguments
     if (optInFilename == NULL || optOutFilename == NULL)
     {
+        argShowHelp();
         res = dmError(DMERR_INVALID_ARGS,
-            "Input or output file not specified. Try --help.\n");
+            "Input or output file not specified.\n");
         goto out;
     }