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.0.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.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: customtraceback-0.8.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8d8da579aa37cd091220a807e08ca0e6c3aec0405d5a9db97e58a127bd5e2034
MD5 0579022eff3275448e35f402d58aefe0
BLAKE2b-256 5f3036a838f72efc8c7d772e145a9ac150ec5102e6b09f28ed1b657debffb7a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for customtraceback-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 161c3ca9fd588332a005f1ce7009d5600b0fe0133854dfa3bbc957d0b7d4f2b4
MD5 f3256335b19ab115df0f4a73b713c3d6
BLAKE2b-256 72b190fb38fd22b47618e28a6cbc1cf141fd9484f2c2020ca19aa9935699df40

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