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'))
Detecting ERROR:
print(x.func_name(1, 3, '4'))
^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<- Exception raise: TypeError ->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
line 11 in func_name:
return(sum(args))
TypeError: unsupported operand type(s) for +: 'int' and 'str'
----------------------------------------------------------------------
Note
Changes