module documentation
(source)

This module contains the base class for all errors in zim
Class Error Base class for all errors in zim.
Function exception_handler No summary
Function get_error_msg No summary
Function log_error Log error and traceback @param error: error as understood by get_error_msg() @param debug: optional debug message, defaults to the error itself
Function set_use_gtk No summary
Function show_error Show an error by calling log_error() and when running interactive also calling ErrorDialog. @param error: the error object
Variable logger Undocumented
Variable use_gtk_errordialog Undocumented
Function _run_error_dialog Undocumented
def exception_handler(debug): (source)
Like show_error() but with debug message instead of the actual error. Intended to be used in except blocks as a catch-all for both intended and unintended errors.
Parameters
debugdebug message for logging
def get_error_msg(error): (source)
Returns the message to show for an error
Parameters
errorerror object or string
Returns
2-tuple of: message string and a boolean whether a traceback should be shown or not
def log_error(error, debug=None): (source)
Log error and traceback
Parameters
errorerror as understood by get_error_msg()
debugoptional debug message, defaults to the error itself
def set_use_gtk(use_gtk): (source)
Set whether or not show_error and exception_handler shold use the ErrorDialog or not.
Parameters
use_gtkset True for interactive gui, False for terminal mode
def show_error(error): (source)
Show an error by calling log_error() and when running interactive also calling ErrorDialog.
Parameters
errorthe error object
logger = (source)

Undocumented

use_gtk_errordialog: bool = (source)

Undocumented

def _run_error_dialog(error): (source)

Undocumented