Skip to content
Snippets Groups Projects
Commit 0b95c2ba authored by Seblu's avatar Seblu
Browse files

better handling of bad exceptions

parent d51fda10
No related branches found
No related tags found
No related merge requests found
......@@ -137,10 +137,10 @@ except BadArgument as e:
except KeyboardInterrupt:
exit(1)
except cliError as e:
printer.error(str(e))
printer.error("cliError: %s"%str(e))
except Exception as e:
if cccli.debug:
printer.fatal(str(e), quit=False)
printer.fatal("%s: %s"%(type(e), str(e)), quit=False)
raise
printer.warn("This is a not expected error, please report it!")
printer.fatal(str(e))
......@@ -149,7 +149,7 @@ class Cli(object):
except Exception as e:
if cccli.debug:
raise
self.printer.error(str(e))
self.printer.error("%s: %s"%(type(e), str(e)))
self.printer.warn("This is a not expected error, please report it!")
class CliHandler(RpcHandler):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment