catch every CallErrors errors in repl applications
This commit is contained in:
parent
95c445223c
commit
4f73e8535e
1 changed files with 1 additions and 4 deletions
|
|
@ -262,10 +262,7 @@ class ReplApplication(Cmd, BaseApplication):
|
|||
try:
|
||||
return super(ReplApplication, self).onecmd(_cmd)
|
||||
except CallErrors, e:
|
||||
if len(e.errors) == 1 and isinstance(e.errors[0][1], FieldNotFound):
|
||||
print >>sys.stderr, e.errors[0][1]
|
||||
else:
|
||||
raise
|
||||
print >>sys.stderr, '%s' % e
|
||||
except NotEnoughArguments, e:
|
||||
print >>sys.stderr, 'Error: no enough arguments.'
|
||||
except (KeyboardInterrupt,EOFError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue