Decorator for catching exception and print them nicely.
Project description
Excptr
Decorator for catching exception and print them nicely
[Production-Development]
Installation
pip install excptr-karjakak
Usage
@excp()
def ...
@excpcls()
class ...
Example
Filename caller: /USERS/__MAIN__.PY
ERROR - <func_name>:
-----------------------------------------------------------------------
Start at:
line 26 in <module>:
print(x.func_name(1, 3, '4'))
line 111 in trac:
if fn := f(*args, **kwargs):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<- Exception raise: TypeError ->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
line 11 in addall:
return(sum(args))
TypeError: unsupported operand type(s) for +: 'int' and 'str'
----------------------------------------------------------------------
Note
- There are 3 types of format:
- -1 (by default) -> raise an exception
- 0 -> print exception in logical order and nicely
- 1 -> show exception in gui tkinter
- Viewing limited in total of 60 seconds
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
excptr-karjakak-0.1.7.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file excptr-karjakak-0.1.7.tar.gz
.
File metadata
- Download URL: excptr-karjakak-0.1.7.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1203222b5fe51df5a402042d1de4a99e005a24c24ad6d3dc91f084c65fdc49 |
|
MD5 | cab4067b6f3c69ba1ef324dd6fa25ad0 |
|
BLAKE2b-256 | 56710397479d38cdad900517cca66500f4ca7b98fc15da4e0eaa28fcf2a39109 |
File details
Details for the file excptr_karjakak-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: excptr_karjakak-0.1.7-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c1ed0767b11525c1484bcf2fdd7c8f76e361f8e05979825a2014f4b7efdf45d |
|
MD5 | 09708c939e1860002e3c61b9b3f746d2 |
|
BLAKE2b-256 | 9ce6178f62198b6f7646dd3048a812e3ec1639c17c81527faa7067798565fe27 |