Show More
@@ -1920,7 +1920,7 b' class InteractiveShell(Component, Magic):' | |||||
1920 | # SystemExit exception changed between Python 2.4 and 2.5, so |
|
1920 | # SystemExit exception changed between Python 2.4 and 2.5, so | |
1921 | # the checks must be done in a version-dependent way. |
|
1921 | # the checks must be done in a version-dependent way. | |
1922 | show = False |
|
1922 | show = False | |
1923 |
if status. |
|
1923 | if status.args[0]==0 and not kw['exit_ignore']: | |
1924 | show = True |
|
1924 | show = True | |
1925 | if show: |
|
1925 | if show: | |
1926 | self.showtraceback() |
|
1926 | self.showtraceback() |
@@ -6,11 +6,10 b' ipython.' | |||||
6 | try: |
|
6 | try: | |
7 | import wx |
|
7 | import wx | |
8 | except ImportError, e: |
|
8 | except ImportError, e: | |
9 |
e. |
|
9 | e.args[0] = """%s | |
10 | ________________________________________________________________________________ |
|
10 | ________________________________________________________________________________ | |
11 | You need wxPython to run this application. |
|
11 | You need wxPython to run this application. | |
12 |
""" % e. |
|
12 | """ % e.args[0] | |
13 | e.args = (e.message, ) + e.args[1:] |
|
|||
14 | raise e |
|
13 | raise e | |
15 |
|
14 | |||
16 | from wx_frontend import WxController |
|
15 | from wx_frontend import WxController |
@@ -127,9 +127,11 b' class TaskRejectError(KernelError):' | |||||
127 | class CompositeError(KernelError): |
|
127 | class CompositeError(KernelError): | |
128 | def __init__(self, message, elist): |
|
128 | def __init__(self, message, elist): | |
129 | Exception.__init__(self, *(message, elist)) |
|
129 | Exception.__init__(self, *(message, elist)) | |
130 | self.message = message |
|
130 | # Don't use pack_exception because it will conflict with the .message | |
|
131 | # attribute that is being deprecated in 2.6 and beyond. | |||
|
132 | self.msg = message | |||
131 | self.elist = elist |
|
133 | self.elist = elist | |
132 |
|
134 | |||
133 | def _get_engine_str(self, ev): |
|
135 | def _get_engine_str(self, ev): | |
134 | try: |
|
136 | try: | |
135 | ei = ev._ipython_engine_info |
|
137 | ei = ev._ipython_engine_info | |
@@ -137,7 +139,7 b' class CompositeError(KernelError):' | |||||
137 | return '[Engine Exception]' |
|
139 | return '[Engine Exception]' | |
138 | else: |
|
140 | else: | |
139 | return '[%i:%s]: ' % (ei['engineid'], ei['method']) |
|
141 | return '[%i:%s]: ' % (ei['engineid'], ei['method']) | |
140 |
|
142 | |||
141 | def _get_traceback(self, ev): |
|
143 | def _get_traceback(self, ev): | |
142 | try: |
|
144 | try: | |
143 | tb = ev._ipython_traceback_text |
|
145 | tb = ev._ipython_traceback_text | |
@@ -145,14 +147,14 b' class CompositeError(KernelError):' | |||||
145 | return 'No traceback available' |
|
147 | return 'No traceback available' | |
146 | else: |
|
148 | else: | |
147 | return tb |
|
149 | return tb | |
148 |
|
150 | |||
149 | def __str__(self): |
|
151 | def __str__(self): | |
150 |
s = str(self.m |
|
152 | s = str(self.msg) | |
151 | for et, ev, etb in self.elist: |
|
153 | for et, ev, etb in self.elist: | |
152 | engine_str = self._get_engine_str(ev) |
|
154 | engine_str = self._get_engine_str(ev) | |
153 | s = s + '\n' + engine_str + str(et.__name__) + ': ' + str(ev) |
|
155 | s = s + '\n' + engine_str + str(et.__name__) + ': ' + str(ev) | |
154 | return s |
|
156 | return s | |
155 |
|
157 | |||
156 | def print_tracebacks(self, excid=None): |
|
158 | def print_tracebacks(self, excid=None): | |
157 | if excid is None: |
|
159 | if excid is None: | |
158 | for (et,ev,etb) in self.elist: |
|
160 | for (et,ev,etb) in self.elist: |
General Comments 0
You need to be logged in to leave comments.
Login now