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
Hashes for exception_details-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25fd994796e174d85b36704b8604207d6a3cc965d1dbf915e914d7eab6676407 |
|
MD5 | e528a3ccc6056804e335b3394f7f20b9 |
|
BLAKE2b-256 | 5bcf2e136070a87aaf479741adc4e906ee71fff0d92977aa55010229db3c3416 |