Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79955 > unrolled thread
| Started by | Peter Otten <__peter__@web.de> |
|---|---|
| First post | 2014-10-30 13:45 +0100 |
| Last post | 2014-10-30 13:45 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: When using a decorator exceptions raised reference the decorator not the function Peter Otten <__peter__@web.de> - 2014-10-30 13:45 +0100
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2014-10-30 13:45 +0100 |
| Subject | Re: When using a decorator exceptions raised reference the decorator not the function |
| Message-ID | <mailman.15322.1414673413.18130.python-list@python.org> |
Néstor Boscán wrote: > I'm using Python 2.7 and I'm creating a class decorator that extract > information from exceptions for logging purposes. > > Everytime an exception is raised from the original function and I extract > the origin of the exception with sys.exc_info() I get a reference to the > line in the decorator where the function is called, not the line of the > original function where the exception was raised. > > Any ideas? Please show us the code, preferably as a small self-contained example. Thank you.
Back to top | Article view | comp.lang.python
csiph-web