@classmethod
def register_errorhandler(cls, app):
    """Register the standard error handler for this exception on this App.

        This will set :meth:`errorhandler_callback` as an error handler for
        this exception. This means all exceptions that inherit from this class
        will be caught by that error handler.

        This method does nothing other than registration and the actual
        implementation of the callback is found in
        :meth:`errorhandler_callback`. If you want a custom exception derived
        from this exception to run a custom callback, please override
        :meth:`errorhandler_callback`, and continue to use this function to
        register.

        Example usage:

        .. code:: python

            from fleaker import AppException

            def create_app():
                app = fleaker.App(__name__)

                # this will register the standard callback
                AppException.register_errorhandler(app)

                class MyException(AppException):
                    ""\"Has a custom handler callback.""\"

                    @classmethod
                    def errorhandler_callback(cls, exc):
                        ""\"Custom error handler that greets the user.""\"
                        return 'Hi'

                # now whenever MyException or it's sub-classes are thrown, the
                # user will get `Hi` back
                MyException.register_errorhandler(app)

        Args:
            app (flask.Flask):
                The Flask application to register the standard handler callback
                to.

        Returns:
            fleaker.exceptions.FleakerBaseException:
                Returns the same class this was called on, to provide a fluent
                interface (e.g., register error handlers on multiple apps in
                one method chain).
        """
    app.errorhandler(cls)(cls.errorhandler_callback)
    return app
