Convenience facilities for managing exceptions.
Project description
Presents:
return_exc_info: call supplied function with arguments, return either (function_result, None) or (None, exc_info) if an exception was raised.
@returns_exc_info, a decorator for a function which wraps in it return_exc_info.
@noexc, a decorator for a function whose exceptions should never escape; instead they are logged. The initial use case was inside logging functions, where I have had a failed logging action abort a program. Obviously this is a decorator which should see very little use.
@noexc_gen, a decorator for generators with similar effect to @noexc for ordinary functions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cs.excutils-20150118.tar.gz
.
File metadata
- Download URL: cs.excutils-20150118.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1001db6293685b47b8ec9d813e05b7f99bdc773f27894399d8e94d9c9e264035 |
|
MD5 | 7ad0db5c34df8052ba3c3b534756c116 |
|
BLAKE2b-256 | 6da3dadb4c01fa3b84a24cfed47c228008bec0511184acd92afbee57419f9186 |