Skip to main content

DeveloperExceptionConfig

This class manages the configuration settings for developer-focused exception handling and display. It allows users to toggle enhanced exception formatting, control the visibility of local variables in tracebacks, and choose between short or full error reports.

Attributes

AttributeTypeDescription
pretty_exceptions_enablebool = TrueToggle to enable or disable stylized, colorized exception formatting in the console.
pretty_exceptions_show_localsbool = TrueFlag to determine whether local variable values should be displayed within the exception traceback.
pretty_exceptions_shortbool = TrueFlag to control whether the traceback is truncated to show only the most relevant frames.

Constructor

Signature

def DeveloperExceptionConfig(
pretty_exceptions_enable: bool = True,
pretty_exceptions_show_locals: bool = True,
pretty_exceptions_short: bool = True
) - > None

Parameters

NameTypeDescription
pretty_exceptions_enablebool = TrueWhether to enable pretty exception formatting.
pretty_exceptions_show_localsbool = TrueWhether to show local variables in the exception output.
pretty_exceptions_shortbool = TrueWhether to use a shortened format for pretty exceptions.

Signature

def DeveloperExceptionConfig(
pretty_exceptions_enable: bool = True,
pretty_exceptions_show_locals: bool = True,
pretty_exceptions_short: bool = True
) - > None

Parameters

NameTypeDescription
pretty_exceptions_enablebool = TrueToggles the use of rich, formatted exception displays instead of standard Python tracebacks.
pretty_exceptions_show_localsbool = TrueDetermines whether local variable values are displayed within each stack frame to assist with debugging.
pretty_exceptions_shortbool = TrueControls whether to truncate long tracebacks to show only the most relevant frames.