Changes in demo/arg_parser_demo.cc [842:c2ff0a365245:440:88ed40ad0d4f] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/arg_parser_demo.cc
r842 r440 66 66 .other("..."); 67 67 68 // Throw an exception when problems occurs. The default behavior is to69 // exit(1) on these cases, but this makes Valgrind falsely warn70 // about memory leaks.71 ap.throwOnProblems();72 73 68 // Perform the parsing process 74 69 // (in case of any error it terminates the program) 75 // The try {} construct is necessary only if the ap.trowOnProblems() 76 // setting is in use. 77 try { 78 ap.parse(); 79 } catch (ArgParserException &) { return 1; } 70 ap.parse(); 80 71 81 72 // Check each option if it has been given and print its value
Note: See TracChangeset
for help on using the changeset viewer.