Skip to main content

A tree-style Python error formatter that replaces the default traceback printer.

Project description

ErrMap

A tree-style Python error formatter that replaces the default traceback printer with a clean, colour-coded call tree.

[ERR-MAP] Traceback detected
 root
 └── main_loop (line 12)
      > game_update()
 │    └── game_update (line 9)
      > physics_calc()
 │    │    └── physics_calc (line 6)
      > return 1 / 0

ZeroDivisionError: division by zero

Install

pip install errmap

Usage

from errmap import ErrMap

errmap = ErrMap()
errmap.install()

That's it. From that point on any unhandled exception will print as a tree instead of the default traceback.


API

ErrMap()

Creates a new ErrMap instance.

errmap.install()

Replaces sys.excepthook with the tree formatter.

errmap.active

Set to False to temporarily disable ErrMap and fall back to the default traceback printer.

errmap.active = False  # default traceback
errmap.active = True   # tree formatter

License

MIT

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

errmap-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

errmap-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file errmap-1.0.0.tar.gz.

File metadata

  • Download URL: errmap-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for errmap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f28fa63bed9682a368c9ad17f09c83b1378c5c23cd24c7b3d988901fd94b7941
MD5 e35a5be0b80d310a62536bbd4146e727
BLAKE2b-256 52235ce87f76003d8033c935f6527b84c87955c500f587bbb1ba71eb56cc0d16

See more details on using hashes here.

File details

Details for the file errmap-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: errmap-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for errmap-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be64e985e40fa770077d275835b7f6351c5835352b47fba9f1a65df0ac3d197d
MD5 8c54b859cac50e1e0358fab0490ab7d1
BLAKE2b-256 1e537da3968190d78c0a3b54b20a5b1acf09663a4e34bedca3249468e104f001

See more details on using hashes here.

Supported by

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