From 628c9211bee8b84a69c0fe1473308980067b542c Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 29 Apr 2011 10:17:36 +0100 Subject: [PATCH] Cope with unicode characters in exceptions --- 0compile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/0compile b/0compile index c4dfd33..df42feb 100755 --- a/0compile +++ b/0compile @@ -92,6 +92,9 @@ except UsageError, ex: sys.exit(1) except SafeException, ex: if options.verbose: raise - print >>sys.stderr, str(ex) + try: + print >>sys.stderr, unicode(ex) + except: + print >>sys.stderr, repr(ex) sys.exit(1) -- 2.11.4.GIT