Skip to main content

A quick way to customize your Tracebacks

Project description

customTraceback

A quick and easy way to customize your Python tracebacks

import customTraceback

def myTraceback(name, value, tb, line): 
    print(f"🔥 Exception: {name}") # name: name of the exception
    print(f"💬 {value}") # value: Value (description) of the exception
    print(f"📜 Trace: {tb}") # tb: Traceback (default traceback without colors)
    print(f"📄 At Line: {line}" # line: the line number (string)

customTraceback.setTraceBack(myTraceback)

1 / 0

This replaces any Exception with a custom traceback, but in this example, it raises zerodevisionerror

This is a basic example this package is a fun package to make cool tracebacks

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

customtraceback-0.8.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

customtraceback-0.8.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file customtraceback-0.8.1.tar.gz.

File metadata

  • Download URL: customtraceback-0.8.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for customtraceback-0.8.1.tar.gz
Algorithm Hash digest
SHA256 868075485de8f18536ef3728d00927c8a11fd7ead2879ad3a782f1a0739aab5c
MD5 9c12aacdcac174c053596feb55ee3f9c
BLAKE2b-256 846aa64cba104a46ed2b2bb653a7f65274924d328dd1e78009dedb0e581fce1f

See more details on using hashes here.

File details

Details for the file customtraceback-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for customtraceback-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c45cbd49e2ae7b2c9ab9af7bebcdb52b72bc60e4922cb9e4fdf68523436345c2
MD5 59fd6ef483becd79c270c09245a81950
BLAKE2b-256 c2d541a0aaefa1271f724387cc9e78de235523fd4bdb113661902867a960c5ea

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