Skip to content

Commit

Permalink
Exit on error
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel committed Jan 24, 2017
1 parent 9ec2ada commit a3eb94b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions OMPlot/OMPlotGUI/main.cpp
Expand Up @@ -46,9 +46,15 @@
using namespace OMPlot;

#define CONSUME_BOOL_ARG(i,n,var) { \
if (0 == strcmp("true",argv[i]+n)) var = true; \
else if (0 == strcmp("false",argv[i]+n)) var = false; \
else {fprintf(stderr, "%s does not describe a boolean value\n", argv[i]);} \
if (0 == strcmp("true", argv[i]+n)) \
var = true; \
else if (0 == strcmp("false", argv[i]+n)) \
var = false; \
else \
{ \
fprintf(stderr, "Error: %s does not describe a boolean value\n", argv[i]); \
return 1; \
} \
}

void printUsage(bool shortDescription)
Expand Down

0 comments on commit a3eb94b

Please sign in to comment.