<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def errorhandler_callback(cls, exc):
 """This function should be called in the global error handlers. This will allow for consolidating of cleanup tasks if the exception bubbles all the way to the top of the stack. For example, this method will automatically rollback the database session if the exception bubbles to the top. This is the method that :meth:`register_errorhandler` adds as an errorhandler. See the documentation there for more info. Args: exc (FleakerBaseException):
 The exception that was thrown that we are to handle. """

        # @TODO (orm, exc): Implement this when the ORM/DB stuff is done
        # if not exc.prevent_rollback:
        #     db.session.rollback()

        if exc.flash_message:
            flash(exc.flash_message, exc.flash_level)

        if exc.redirect is not MISSING:
            return redirect(url_for(exc.redirect, **exc.redirect_args))

        error_result = exc.error_page()

        if error_result is not None:
            return error_result, exc.status_code or 500