Skip to main content

get_exception_info

Format exception information for display on the debug page using the structure described in the template API documentation.

def get_exception_info(
exception: Exception
) - > dict

Format exception information for display on the debug page using the structure described in the template API documentation.

Parameters

NameTypeDescription
exceptionExceptionThe exception object containing metadata such as filename, line number, and source code to be formatted.

Returns

TypeDescription
dictA dictionary containing the filename, error message, line number, and a window of source code lines surrounding the error for debugging display.