File: panicHandler.go

package info (click to toggle)
moor 2.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,960 kB
  • sloc: sh: 229; ansic: 12; xml: 6; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 355 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package twin

import "fmt"

// NOTE: This file should do the same thing as internal/panicHandler.go as much
// as possible.

func panicHandler(goroutineName string, recoverResult any, stackTrace []byte) {
	if recoverResult == nil {
		return
	}

	log.Error(fmt.Sprintf("Goroutine panicked: %s: %v\n%s", goroutineName, recoverResult, string(stackTrace)))
}