<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def post_create_app(cls, app, **settings):
 """Register the errorhandler for the AppException to the passed in App. Args: app (fleaker.base.BaseApplication):
 A Flask application that extends the Fleaker Base Application, such that the hooks are implemented. Kwargs: register_errorhandler (bool):
 A boolean indicating if we want to automatically register an errorhandler for the :class:`AppException` exception class after we create this App. Pass ``False`` to prevent registration. Default is ``True``. Returns: fleaker.base.BaseApplication: Returns the app it was given. """

        register_errorhandler = settings.pop('register_errorhandler', True)

        if register_errorhandler:
            AppException.register_errorhandler(app)

        return app