Show
Ignore:
Timestamp:
09/27/05 20:34:31 (19 years ago)
Author:
jerome
Message:

Ensure that human made errors (like incorrect command line options)
don't produce a traceback anymore. No need to frighten users with
such complete tracebacks and email reporting each time they mistype
some command.
Makes pykosd check more carefully the values of its command line options.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/autopykota

    r2447 r2512  
    2828import os 
    2929 
    30 from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_ 
     30from pykota.tool import PyKotaTool, PyKotaToolError, PyKotaCommandLineError, crashed, N_ 
    3131 
    3232__doc__ = N_("""autopykota v%(__version__)s (c) %(__years__)s %(__author__)s 
     
    115115            automat.display_version_and_quit() 
    116116        elif args :     
    117             raise PyKotaToolError, "autopykota doesn't accept non option arguments !" 
     117            raise PyKotaCommandLineError, "autopykota doesn't accept non option arguments !" 
    118118        else : 
    119119            retcode = automat.main(args, options) 
    120120    except KeyboardInterrupt :         
    121121        sys.stderr.write("\nInterrupted with Ctrl+C !\n") 
     122    except PyKotaCommandLineError, msg :     
     123        sys.stderr.write("%s : %s\n" % (sys.argv[0], msg)) 
    122124    except SystemExit :         
    123125        pass