A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021533.html below:

[Python-Dev] Re: PEP 282 comments

[Python-Dev] Re: PEP 282 commentsTrent Mick trentm@ActiveState.com
Wed, 20 Mar 2002 18:13:07 -0800
[Vinay Sajip wrote]
> > > def logException(self, level, exc_info, msg, *args)
> >
> > No need to pass in the exc_info if you are already specifying that an
> > exception is being logged via log*Exception*.

> Yes, except that you are assuming (I think) that logException would call
> sys.exc_info() to get the exception info.  what about if the exception info
> needs to come from somewhere else (e.g.  from a pickled message sent over
> the wire)? I haven't yet thought through all the issues about passing
> tracebacks etc. across sockets...

Touche, I haven't thought about that either and don't know if I am qualified
to determine if that is a common enough case. If it is *not* that common then
(forgetting the 'level'-issue for the moment) you have to admit that:

    try:
        ...
    except:
        log.exception("My britches are burning!")

sure is a log nicer than

    try:
        ...
    except:
        log.logException(sys.exc_info(), "My britches are burning!")


Trent

-- 
Trent Mick
TrentM@ActiveState.com



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4