A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/108128.html below:

accessing detail about Exceptions

accessing detail about Exceptions accessing detail about ExceptionsBill Seitz fluxent at yahoo.com
Tue Apr 24 12:30:48 EDT 2001
"Steve Purcell" <stephen_purcell at yahoo.com> wrote in message
news:mailman.988094016.14138.python-list at python.org...
> Bill Seitz wrote:
> > I'm pretty new to Python, but my books are pre-v2. Is there any good
example
> > code anywhere for catching exceptions? I'm particularly interested in
> > accessing the "associated value" info, without having trapped a
particular
> > type of exception (in other words, I want to catch with a generic
"except:"
> > if possible, not "except ValueError:"...)
>
> Look at 'exc_info()' in the 'sys' module:
>
>    try:
>        something_or_other()
>    except:
>        exc_type, exc_value, traceback = sys.exc_info()
>
> The exception value you want is 'exc_value' in this case.
>
> -Steve

Thanks. Confirmed that's it's a basic opening-connection problem
([Microsoft][ODBC SQL Server Driver]Client unable to establish connection in
LOGIN). Now I just have to figure out why that's happening for the ASP page
and not the interactive session. Probably some stupid nasty sysadmin
problem. Gads I hate those...




More information about the Python-list mailing list

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