MantisBT - Rosetta
View Issue Details
0000200Rosetta[All Projects] Input Handlingpublic2013-03-07 08:392013-03-26 18:42
momeara 
 
normalminoralways
newopen 
All platformsAnyAny
 
 
all
benchmark.linuxclangrelease -asdflkajsdf
Feature Request
0000200: When given a bad option on the command line print what is usually displayed with -help
When a bad option is given on the command line, currently it comes back with something like:

ERROR: Option matching -scale_factor not found in command line top-level context
caught exception ERROR: Option matching -scale_factor not found in command line top-level context

Wouldn't it be nice it came back with that error and then (formated in fixed with font of course):


Usage:

../../../bin/benchmark.postgres.linuxclangrelease [options]

Options: [Specify on command line or in @file]

Showing only relevant options...


                        Option | Setting |Type| Description
--------------------------------------------------------------------------------------
                               | | |
                        run: | | |
               benchmark_scale | 1 | R| Amount to scale number of
                               | | | cycles to repeate each
                               | | | test
             run_one_benchmark | | S| Run just a single
                               | | | performance benchmark
               benchmark_scale | 1 | R| Amount to scale number of
                               | | | cycles to repeate each
                               | | | test
             run_one_benchmark | | S| Run just a single
                               | | | performance benchmark
                               | | |
                    in:path: | | |
                      database | | (P)| Database file input search
                               | | | paths. If the database is
                               | | | not found the ROSETTA3_DB
                               | | | environment variable is
                               | | | tried.
No tags attached.
related to 0000168resolved mtyka Bad option reads throw uncaught exceptions 
related to 0000221new  Crashes on blank command line 
related to 0000226new  Feature Request: catch option-system throws locally; handle them somewhat more fancily 
Issue History
2013-03-07 08:39momearaNew Issue
2013-03-20 11:34smlewisRelationship addedrelated to 0000168
2013-03-21 09:07smlewisRelationship addedrelated to 0000221
2013-03-21 09:09smlewisNote Added: 0000199
2013-03-21 12:16smlewisRelationship addedrelated to 0000226

Notes
(0000199)
smlewis   
2013-03-21 09:09   
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)

We only want to print help for B; for A it already prints a nice message requesting the user disambiguate their choice (and what the unambiguous choices are).