Re: How to get inner exception traceback

2008-04-24 Thread Gabriel Genellina
En Thu, 24 Apr 2008 08:20:29 -0300, Thomas Guettler <[EMAIL PROTECTED]> escribió: How can you get the traceback of the inner exception? try: try: import does_not_exit except ImportError: raise Exception("something wrong") except: ... Background: In Django so

Re: How to get inner exception traceback

2008-04-24 Thread bockman
On 24 Apr, 15:00, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > : > > > class ReraisedException(Exception): > >     def __init__(self, message, exc_info): > >         Exception.__init__(self, message) > >         self.inner_exception = exc_info > > >  try: > >       try

Re: How to get inner exception traceback

2008-04-24 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: > On 24 Apr, 13:20, Thomas Guettler <[EMAIL PROTECTED]> wrote: >> Hi, >> >> How can you get the traceback of the inner exception? >> >> try: >> try: >> import does_not_exit >> except ImportError: >> raise Exception("something wrong") >> except:

Re: How to get inner exception traceback

2008-04-24 Thread bockman
On 24 Apr, 13:20, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > How can you get the traceback of the inner exception? > > try: >      try: >          import does_not_exit >      except ImportError: >          raise Exception("something wrong") > except: >      ... > > Background: In Django s

Re: How to get inner exception traceback

2008-04-24 Thread Peter Otten
Thomas Guettler wrote: > How can you get the traceback of the inner exception? You have to record it yourself or it will be lost. > try: > try: > import does_not_exit > except ImportError: > raise Exception("something wrong") > except: > ... > > > Background: