Get nicely formated exception details
Project description
exception_details
Get nicely formated exception details.
Content
-
Installation
-
Usage
Installation
pip install exception-details
Usage
-
print_exception_details(exception: Exception)
Print the exception details.
Usage:
`try: ...` `except Exception as e: print_exception_details(e)`
Contains:
-
function name
-
filepath
-
line
-
code snippet
-
species of the exception
-
message
Args:
exception (Exception): Your Exception
-
-
get_exception_details_dict(exception: Exception)
Get the exception details as a dictionary.
Usage:
`try: ... ` `except Exception as e: details = get_exception_details_dict(e)`
Contains:
-
'function' -> function name
-
'path' -> filepath
-
'line' -> line
-
'code' -> code snippet
-
'species' -> species of the exception
-
'message' -> message
Args:
exception (Exception): Your Exception
Returns:
dict: Exception details as a dictionary with the keys: "function", "path", "line", "code", "species", "message"
-
-
get_exception_details_str(exception: Exception, colored=True)
Print the exception details.
Usage:
`try: ... ` `except Exception as e: details = get_exception_details_str(e)`
Contains:
-
function name
-
filepath
-
line
-
code snippet
-
species of the exception
-
message
Args:
exception (Exception): Your Exception colored (boolean): The string has coloreds parts if True.
Returns:
str: Exception details as a string."
-
Links
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
Built Distribution
File details
Details for the file exception_details-0.0.2.tar.gz
.
File metadata
- Download URL: exception_details-0.0.2.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fc559a900bfdaaba6f26a8139b3ea4a9a6b68121cd913ce53ebfe78d2e2ef5d |
|
MD5 | 84d3d20a3bef9c8384b3c24fa46c65d0 |
|
BLAKE2b-256 | b3f6aae3d5d6fc82294fa0a9475cb92857220f4f02127997a37fd9aebaf0ef81 |
File details
Details for the file exception_details-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: exception_details-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 004a170aa2dd6d6ea583939fee49a82b6c5321b87b558177e78c92c8a1303a73 |
|
MD5 | 17ddc5f806c82e9f13ecca885ca742ed |
|
BLAKE2b-256 | 19c881a03bbc86e5b92f36a030838122c3b14411ea0029742c9fc824d78d9250 |