Skip to main content

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'))

Filename: /USERS/EXCPTR.PY

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


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.9.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

excptr_karjakak-0.1.9-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file excptr-karjakak-0.1.9.tar.gz.

File metadata

  • Download URL: excptr-karjakak-0.1.9.tar.gz
  • Upload date:
  • Size: 3.5 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

Hashes for excptr-karjakak-0.1.9.tar.gz
Algorithm Hash digest
SHA256 17fc2b06d8c782397a81a9859627b3fc7e21d3d00f86fdc5ec0b52826add4160
MD5 a80af69bcc92ef9b5373b2f56e4eb3dc
BLAKE2b-256 8394a818ff48849cc22c56b9e959915ed4f8309e82bfc3155fef66788391c3bd

See more details on using hashes here.

File details

Details for the file excptr_karjakak-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: excptr_karjakak-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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

Hashes for excptr_karjakak-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 51815561c8b01dcc0a776656c932c5ea3937bdfcc0ed4721a62afb612790e3a7
MD5 438a997d1c636c469fc65aa2b2cd07c2
BLAKE2b-256 002dc94082ad89f378d5543f20879965722928ccc5a989a46b01c0f03bc1a98b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page