Skip to main content

universal error handling for python functions.

Project description

ccaerrors

Universal error handling for python functions.

Usage

import sys

from ccaerrors import errorNotify

def somefunction():
    try:
        pass
    except Exception as e:
        errorNotify(sys.exc_info()[2], e)

errorNotify

print the function name and the Exception details to stdout.

errorRaise

print the function name and the Exception details to stdout and also re-raise the Exception

errorExit

print the function name and the Exception details to stdout. Exit the script by calling sys.exit().

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

ccaerrors-0.1.2.tar.gz (13.8 kB view hashes)

Uploaded Source

Built Distribution

ccaerrors-0.1.2-py3-none-any.whl (13.9 kB view hashes)

Uploaded Python 3

Supported by

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