Skip to content

jorg-stor/infi.exceptools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This module features exception chaining.

Usage

Here's an example on how to use this module:

In [1]: from infi.exceptools import chain

In [2]: def example():
   ...:     try:
   ...:         raise RuntimeError()
   ...:     except:
   ...:         raise chain(Exception())
   ...:     

In [3]: try:
   ...:     example()
   ...: except Exception, exc:
   ...:     pass
   ...: 

In [4]: exc.__class__
Out[4]: Exception

In [5]: exc.__cause__.__class__
Out[5]: RuntimeError

Checking out the code

Run the following:

easy_install -U infi.projector
projector devenv build

About

a mechanism for chaining exceptions, compatible with Python 2.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%