summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-03-03 03:43:48 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-03-03 03:43:48 +0100
commit9c291d1368f004828b123edca65f11c4f6e96dfc (patch)
treed8fd1b522f004bcf0aaa68dd8e8324af3092de39
parent40426cb715cc31f43a282d5c22ff70c7c3cfec0f (diff)
downloadpoezio-9c291d1368f004828b123edca65f11c4f6e96dfc.tar.gz
poezio-9c291d1368f004828b123edca65f11c4f6e96dfc.tar.bz2
poezio-9c291d1368f004828b123edca65f11c4f6e96dfc.tar.xz
poezio-9c291d1368f004828b123edca65f11c4f6e96dfc.zip
fixed #2117 Fix tracebacks: remove traceback handler.
-rw-r--r--src/core.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core.py b/src/core.py
index d9f5c8bd..d3dce5be 100644
--- a/src/core.py
+++ b/src/core.py
@@ -180,17 +180,14 @@ class Core(object):
def on_exception(self, typ, value, trace):
"""
- When an exception in raised, open a special tab
- displaying the traceback and some instructions to
- make a bug report.
+ When an exception is raised, just reset curses and call
+ the original exception handler (will nicely print the traceback)
"""
try:
- tb_tab = tabs.SimpleTextTab(self, "/!\ Oups, an error occured (this may not be fatal). /!\\\nPlease report this bug (by copying the present error message and explaining what you were doing) on the page http://dev.louiz.org/project/poezio/bugs/add\n\n%s\n\nIf Poezio does not respond anymore, kill it with Ctrl+\\, and sorry about that :(" % ''.join(traceback.format_exception(typ, value, trace)))
- self.add_tab(tb_tab, focus=True)
- except Exception: # If an exception is raised in this code,
- # this is fatal, so we exit cleanly and display the traceback
self.reset_curses()
- raise
+ except:
+ pass
+ sys.__excepthook__(typ, value, trace)
def grow_information_win(self):
"""