def METHOD_NAME(self, exception, value, tb):
    from .local_server import LocalServer
    from .local_config import LocalConfig
    local_server = LocalServer.instance().localServerSettings()
    if local_server["report_errors"]:
        if not SENTRY_SDK_AVAILABLE:
            log.warning("Cannot capture exception: Sentry SDK is not available")
            return
        if os.path.exists(LocalConfig.instance().runAsRootPath()):
            log.warning("User is running application as root. Crash reports disabled.")
            return
        if not hasattr(sys, "frozen") and os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".git")):
            log.warning(".git directory detected, crash reporting is turned off for developers.")
            return
        try:
            error = (exception, value, tb)
            sentry_sdk.capture_exception(error=error)
            log.info("Crash report sent with event ID: {}".format(sentry_sdk.last_event_id()))
        except Exception as e:
            log.warning("Can't send crash report to Sentry: {}".format(e))