mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-22 18:16:43 +00:00
Use function to determine which functions to skip
This commit is contained in:
@ -57,6 +57,8 @@ var logCrashRgx = regexp.MustCompile("^v.*_crash_.*\\.log$") //nolint[gochecknog
|
||||
|
||||
// HandlePanic reports the crash to sentry or local file when sentry fails.
|
||||
func HandlePanic(cfg *Config, output string) {
|
||||
sentry.SkipDuringUnwind()
|
||||
|
||||
if !cfg.IsDevMode() {
|
||||
apiCfg := cfg.GetAPIConfig()
|
||||
if err := sentry.ReportSentryCrash(apiCfg.ClientID, apiCfg.AppVersion, apiCfg.UserAgent, errors.New(output)); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user