Python Trace Error
Project description
upy-error
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
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Fernando Celmer - email@fernandocelmer.com
- Project Github: https://github.com/UpyExplorer/upy-error
- Project Pypi: https://pypi.org/project/upy-error/
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for upy_error-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ce128f084f6f6a02f53a19fc86ff8b2fc9b61f379f7343b16e7235d65916c2 |
|
MD5 | 826adedaba1b854941e70d7f80892677 |
|
BLAKE2b-256 | abc46abdc541f1478543f7aa05298ec0e75825b6e5272e87f7a75230f2913b1b |