From 3cea28559260280f74939d07938ea25b706c2f99 Mon Sep 17 00:00:00 2001 From: Mike Okola Date: Thu, 12 Dec 2024 13:04:51 -0500 Subject: [PATCH 1/3] NotifyOnPanic panics when n.SendNotice returns an error --- notifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifier.go b/notifier.go index 583412e..44a026f 100644 --- a/notifier.go +++ b/notifier.go @@ -390,7 +390,7 @@ func (n *Notifier) NotifyOnPanic() { "SendNotice failed reporting notice=%q: %s", notice, err, ) - return + panic(v) } panic(v) From c7288e8c2b60dff7d3fab0db2bd04b3458cf8dd5 Mon Sep 17 00:00:00 2001 From: Mike Okola Date: Thu, 12 Dec 2024 13:04:51 -0500 Subject: [PATCH 2/3] NotifyOnPanic panics when n.SendNotice returns an error - Fixes #381 --- notifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifier.go b/notifier.go index 583412e..44a026f 100644 --- a/notifier.go +++ b/notifier.go @@ -390,7 +390,7 @@ func (n *Notifier) NotifyOnPanic() { "SendNotice failed reporting notice=%q: %s", notice, err, ) - return + panic(v) } panic(v) From 92d3c4e33ef3d5e21b1a0503dc54303b4be3500b Mon Sep 17 00:00:00 2001 From: Mike Okola Date: Thu, 12 Dec 2024 14:07:53 -0500 Subject: [PATCH 3/3] Falls through to the outer panic to reduce code duplication --- notifier.go | 1 - 1 file changed, 1 deletion(-) diff --git a/notifier.go b/notifier.go index 44a026f..25aaf39 100644 --- a/notifier.go +++ b/notifier.go @@ -390,7 +390,6 @@ func (n *Notifier) NotifyOnPanic() { "SendNotice failed reporting notice=%q: %s", notice, err, ) - panic(v) } panic(v)