1.1.2.7. exception

1.1.2.7.1. Functions

format_exception_details(exc_type, exc_value, exc_traceback, error_uid=None)[source]

Format exception details to be show to a human. This should include enough information about the type of error that occurred and the system on which it was triggered to allow someone to attempt to debug and fix it. The first three parameters to this function directly correspond to the values returned from the sys.exc_info() function.

Parameters:
  • exc_type – The type of the exception.
  • exc_value – The exception instance.
  • exc_traceback – The traceback object corresponding to the exception.
  • error_uid (str, uuid.UUID) – A unique identifier for this exception.
Returns:

A formatted message containing the details about the exception and environment.

Return type:

str

format_exception_name(exc_type)[source]

Format the exception name into a more easily recognizable format.

Parameters:exc_type – The type of the exception.
Returns:The formatted exception name.
Return type:str

1.1.2.7.2. Classes

class ExceptionDialog(application, exc_info=None, error_uid=None)[source]

Bases: king_phisher.client.gui_utilities.GladeGObject

Display a dialog which shows an error message for a python exception. The dialog includes useful details for reporting and debugging the exception which occurred.

__init__(application, exc_info=None, error_uid=None)[source]
Parameters:
  • application (Gtk.Application) – The parent application for this object.
  • exc_info (tuple) – The exception information as provided by sys.exc_info().
  • error_uid (str) – An optional unique identifier for the exception that can be provided for tracking purposes.