Skip to main content

Python Trace Error

Project description

upy-error

GitHub Org's stars PyPI - Python Version PyPI GitHub last commit



How to install?

pip install upy-error

How to use?

# Import the package
from upy_error import format_exception

Exception example with (log)

try:
    print(x)
except Exception as error:
    # Using the function to process the error with the 'logging' package.
    format_exception(error=error, log=True)

Output:

==========================================
2022-07-23 00:13:37,577 ERROR 
UpyError: 
  File "test_upy_error.py", line 4, in <module>
    print(x)
NameError: name 'x' is not defined
==========================================

Exception example with (print)

try:
    1 / 0
except Exception as error:
    # Using the function to return the error in string format.
    print(format_exception(error=error))

Output:

UpyError: 
  File "test_upy_error.py", line 11, in <module>
    1 / 0
ZeroDivisionError: division by zero

Commit Style

  • ⚙️ FEATURE
  • 📝 PEP8
  • 📌 ISSUE
  • 🪲 BUG
  • 📘 DOCS
  • 📦 PyPI
  • ❤️️ TEST
  • ⬆️ CI/CD
  • ⚠️ SECURITY

License

Distributed under the MIT License. See LICENSE for more information.

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

upy-error-0.0.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

upy_error-0.0.3-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file upy-error-0.0.3.tar.gz.

File metadata

  • Download URL: upy-error-0.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for upy-error-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fffb5593ed88978487cf45209f189cb12a78bfab66c7f4ba123f101aeaba3f16
MD5 6b8b4dcc5449e1cd2a1fd837aafcef2d
BLAKE2b-256 1934cd281a63a9213bc32994f953fe2b40109687c5cdcce767e43571ab06a35c

See more details on using hashes here.

File details

Details for the file upy_error-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: upy_error-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for upy_error-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 545b0e84bffb220aab8caaa7eff6c2a400a7ed9b430d7b55b3d0b47c753f8307
MD5 6148f66dbab098c22031959e92008856
BLAKE2b-256 41db396164e11c395dc19ef3490ff71ab1fd6fbca767ef35a59da9914ef5f307

See more details on using hashes here.

Supported by

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