Skip to main content

A simple Python package for error formatting.

Project description

Errorify

Errorify is a simple Python package designed to streamline error formatting in your projects. With Errorify, you can organize and present errors in a structured and user-friendly manner, enhancing code readability and simplifying debugging processes.

Install

You can easily install Errorify using pip:

pip install errorify

Usage

To utilize Errorify within your Python projects, simply import it and pass the error object to the errorify method. It will return the formatted error details string.

Below is an example illustrating how to incorporate Errorify into your code:

from errorify import errorify

try:
    raise ValueError('Invalid Value')
except Exception as e:
    print(errorify(e))

Output

The code snippet provided yields the following output:

---------------- Error Details ----------------
Exception Name: ValueError
Exception Message: Invalid Value
Exception File Path: /home/user/Documents/test.py
Exception File Name: test.py
Exception File Line Number: 4
Error File Path: /home/user/Documents/test.py
Error File Name: test.py
Error File Line Number: 4
-----------------------------------------------

Another Example

Code snippet:

from errorify import errorify

try:
    value = 1 / 0

    print(value)
except Exception as e:
    print(errorify(e))

Output:

---------------- Error Details ----------------
Exception Name: ZeroDivisionError
Exception Message: division by zero
Exception File Path: /home/user/Documents/test.py
Exception File Name: test.py
Exception File Line Number: 4
Error File Path: /home/user/Documents/test.py
Error File Name: test.py
Error File Line Number: 4
-----------------------------------------------

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

errorify-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

errorify-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file errorify-0.0.1.tar.gz.

File metadata

  • Download URL: errorify-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for errorify-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ba82c10ea415d8dfb4b1fc7d58c88c24793a64a186010da9f4be37787227bc90
MD5 ce05ab3b47126b0481bac926f6035c83
BLAKE2b-256 494cb2465904b0921b2569ad1055bccdd57f2e0cdfda7b819c5400c03aa5da2c

See more details on using hashes here.

File details

Details for the file errorify-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: errorify-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for errorify-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90d8d159f14a5b8b3d039bd0647dc4c0f8e166893499bb4585b922a2b8cc2168
MD5 dbb9197578af2c7b72ab8fda583bfa99
BLAKE2b-256 8178b74a0b24a68d77f517f79ed8d25c1c83c2e7212f6841ef48f374ae2b3e50

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