Commit 0b95c2ba authored by Seblu's avatar Seblu
Browse files

better handling of bad exceptions

parent d51fda10
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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))
+1 −1
Original line number Diff line number Diff line
@@ -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):