MantisBT - Rosetta
View Issue Details
0000226Rosetta[All Projects] Input Handlingpublic2013-03-21 12:152013-03-21 15:08
smlewis 
 
normalminoralways
newopen 
 
 
exception handling
exception handling
Feature Request
0000226: Feature Request: catch option-system throws locally; handle them somewhat more fancily
Mike Tyka added the feature for the option system to throw exceptions for erroneous options. This feature request is to extend that a bit.

There are (at least) two types of bad options:

A) Correct but insufficiently specific option (did you mean -packing:repack_only, or -somethingelse:repack_only?)

B) Never-correct options (-this_option_does_not_exist)

For exception type A (some exception subclass), print a message of what the other choices are (this code already exists), then re-throw for a potential re-handing at executable level.

For B (different exception class), print whatever -help would print, then re-throw for the executable to handle if it can.

We need to re-throw in all cases because A) our all-executables-catch test depends on catching a badly formatted option and B) the executable may know much more about what options were meant than we do in core::init.
No tags attached.
related to 0000200new  When given a bad option on the command line print what is usually displayed with -help 
related to 0000168resolved mtyka Bad option reads throw uncaught exceptions 
related to 0000189resolved renfrew Turn on EXIT_THROWS_EXCEPTION by default 
Issue History
2013-03-21 12:15smlewisNew Issue
2013-03-21 12:16smlewisRelationship addedrelated to 0000200
2013-03-21 12:16smlewisRelationship addedrelated to 0000168
2013-03-21 12:16smlewisRelationship addedrelated to 0000189

There are no notes attached to this issue.