Skip to main content

The best python exception library!

Project description

halerror

The best python exception library

PyPI PyPI - Python Version Code style: black Documentation Status Travis (.org) Codecov Language grade: Python Total alerts

This python library implements a sci-fi exception class!

Installation

The package is available from PyPI. To install using pip, do the following:

pip install halerror

To install from source, clone this repository and then do the following:

python setup.py install

Testing

To run the tests, clone this repository and the do the following:

python setup.py test

Building the documentation

To build the documenation, clone this repository and the do the following:

pip install -e .[build_sphinx]
python setup.py build_sphinx

Usage examples

The exception class can be used as follows:

from halerror import HalError

def open_pod_bay_doors():
    raise HalError("Open the pod bay doors, HAL.")

open_pod_bay_doors()

This will result in the following error output, where ${NAME} is the username of the person running the software:

halerror.HalError: Open the pod bay doors, HAL

I'm sorry, ${NAME}. I'm afraid I can't do that.

Having all your exceptions formatted like this is as easy as adding the following lines to your code

from halerror import HalError

try:
    open_pod_bay_doors()
except Exception as error:
    raise HalError(error) from error

Documentation

You can find the full documentation on Read the Docs.

Issues

Please use the GitHub issue tracker to submit bugs or request features.

License

Copyright James Parkhurst, 2019.

Distributed under the terms of the BSD license, halerror is free and open source software.

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

halerror-0.4.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halerror-0.4.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file halerror-0.4.1.tar.gz.

File metadata

  • Download URL: halerror-0.4.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for halerror-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b5b97a5e05dcbb022c7b884564ac268b83f1232f365cf6747b1ac61f6f156146
MD5 8e55e92948acb7fda3f6448bc4cefdb1
BLAKE2b-256 297c5302f069275ac3012df79440201dc9951176f97f9841ba0c13413beb8392

See more details on using hashes here.

File details

Details for the file halerror-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: halerror-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for halerror-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 223aa8fe898cbb406e11f094fe65557fde210aa2144bc5cfbef03c975761f665
MD5 807064143eac03b66614da17060db63e
BLAKE2b-256 4a6fd1acb7b4beae93eac3544fa11c73aacf0f390e46130698b02ef5db320dc2

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