##// END OF EJS Templates
exceptions: improve handling of exception that are unhandled....
marcink -
r2183:be581863 default
parent child Browse files
Show More
@@ -182,7 +182,10 b' def map_vcs_exceptions(func):'
182 # __traceback_info__ in a frame object. This way the remote
182 # __traceback_info__ in a frame object. This way the remote
183 # traceback information is made available in error reports.
183 # traceback information is made available in error reports.
184 remote_tb = getattr(e, '_vcs_server_traceback', None)
184 remote_tb = getattr(e, '_vcs_server_traceback', None)
185 __traceback_info__ = None
185 if remote_tb:
186 if remote_tb:
187 if isinstance(remote_tb, basestring):
188 remote_tb = [remote_tb]
186 __traceback_info__ = (
189 __traceback_info__ = (
187 'Found VCSServer remote traceback information:\n\n' +
190 'Found VCSServer remote traceback information:\n\n' +
188 '\n'.join(remote_tb))
191 '\n'.join(remote_tb))
@@ -194,8 +197,14 b' def map_vcs_exceptions(func):'
194 # to translate them to the proper exception class in the vcs
197 # to translate them to the proper exception class in the vcs
195 # client layer.
198 # client layer.
196 kind = getattr(e, '_vcs_kind', None)
199 kind = getattr(e, '_vcs_kind', None)
200
197 if kind:
201 if kind:
198 raise _EXCEPTION_MAP[kind](*e.args)
202 if any(e.args):
203 args = e.args
204 else:
205 args = [__traceback_info__ or 'unhandledException']
206
207 raise _EXCEPTION_MAP[kind](*args)
199 else:
208 else:
200 raise
209 raise
201 return wrapper
210 return wrapper
General Comments 0
You need to be logged in to leave comments. Login now