From 0b95c2ba7fa1e84711174ccae76f180a14d843a5 Mon Sep 17 00:00:00 2001 From: Seblu Date: Thu, 6 Jan 2011 16:21:51 +0100 Subject: [PATCH] better handling of bad exceptions --- bin/cc-cli | 4 ++-- cccli/cli.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cc-cli b/bin/cc-cli index 9d35541..5fd87a5 100755 --- a/bin/cc-cli +++ b/bin/cc-cli @@ -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)) diff --git a/cccli/cli.py b/cccli/cli.py index e138780..130d8fb 100644 --- a/cccli/cli.py +++ b/cccli/cli.py @@ -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): -- GitLab