Skip to main content

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

  • There are 4 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
    • 2 -> for logging the tracing to a file
      • If you choose 2, please give filename path
      • By default filename is None and if not given filename path, it will be defaulted back to -1 (raise exception)
      • Can use default user_path/dir/file
      • Create default dir function available

Changes

  • Now can detecting ERROR

Metadata

Release files for excptr-karjakak 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for excptr-karjakak 0.2.7
File Size Uploaded
excptr-karjakak-0.2.7.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for excptr-karjakak 0.2.7
File Interpreter ABI Platform
excptr_karjakak-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / excptr-karjakak-0.2.7.tar.gz

Download URL excptr-karjakak-0.2.7.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2545891767cb654b3eab6054dc1a8fb70c838943f0a7900e5cd39a09bcc146f6
BLAKE2b-256 checksum
How to use checksums
42b7189dcfa6c29335099d7c3841e97806c85c037ad67774c61093e270492196
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / excptr_karjakak-0.2.7-py3-none-any.whl

Download URL excptr_karjakak-0.2.7-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
854cff13439bc3d7d63eb20ef3da384f53c3e9388cd740885858f191daf218b8
BLAKE2b-256 checksum
How to use checksums
a93cf1d610901f16e99ca81c891c81d5db0b30d7c76a3699353da7205838ac06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.5

2 release files

0.2.1

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page