Skip to content

Commit 33f5a9b

Browse files
committed
fix(watcher): update Unforeseenf to panic on fatal errors
This commit modifies the Unforeseenf function in the watcher package to panic after logging a fatal error. This change ensures that the application will terminate immediately upon encountering a critical error, improving error handling and application stability.
1 parent 6e2a32d commit 33f5a9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/core/watcher/messages.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ func Unforeseen(message errors.Error) {
3434

3535
func Unforeseenf(message string, args ...interface{}) {
3636
w.logger.Fatal(fmt.Sprintf(message, args...))
37+
panic(fmt.Sprintf(message, args...))
3738
}

0 commit comments

Comments
 (0)