exopy.app.errors.plugin module

Plugin centralizing the application error handling.

class exopy.app.errors.plugin.ErrorsPlugin[source]

Bases: enaml.workbench.plugin.Plugin

Plugin in charge of collecting of the errors.

It will always log the errors, and will notify the user according to their type.


Errors for which a custom handler is registered.


Collect extensions.


Stop the extension collector and clear the list of handlers.

signal(kind, **kwargs)[source]

Signal an error occured in the system.

  • kind (unicode or None) – Kind of error which occurred. If a specific handler is found, it is used, otherwise the generic handling method is used.

  • **kwargs – Arguments to pass to the error handler.


Show a widget summarizing all the errors.


kind (unicode, optional) – If specified only the error related to the specified kind will be reported.


In gathering mode, error handling is differed till exiting the mode.


Upon leaving gathering mode, errors are handled.

If error handling should lead to a window display, all widgets are collected and displayed in a single window. As the gathering mode can be requested many times, the errors are only handled when this method has been called as many times as its counterpart.


Setup a global sys.excepthook for a nicer user experience.

The error message suggest to the user to restart the app. In the future adding an automatic bug report system here would make sense.