Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs.excutils-20160828.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file cs.excutils-20160828.tar.gz.

File metadata

File hashes

Hashes for cs.excutils-20160828.tar.gz
Algorithm Hash digest
SHA256 c4d5329ba300c4b2487565113cab480eb9d4e7145468af896347e7881880369f
MD5 f74046083889a3430a5954a08ec9cfa8
BLAKE2b-256 24ebe6678866c570d669c85d120b6779714d485db700d31f1f8839767f51f89c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page