# HG changeset patch # User catherine.devlin@gmail.com # Date 1296653197 28800 # Node ID b6beae2a2f460e86bd9d25bc7f1e6ba6a717738f # Parent fd8a2da973cbd52b96e63ab7f5be2c453352443b raise a specific error overriding optparse .error diff -r fd8a2da973cb -r b6beae2a2f46 cmd2.py --- a/cmd2.py Wed Feb 02 08:15:21 2011 -0500 +++ b/cmd2.py Wed Feb 02 05:26:37 2011 -0800 @@ -69,7 +69,7 @@ If you override this in a subclass, it should not return -- it should either exit or raise an exception. """ - raise + raise optparse.OptParseError(msg) def remaining_args(oldArgs, newArgList): '''