mirror of
https://github.com/netsampler/goflow2.git
synced 2024-05-06 15:54:52 +00:00
24 lines
334 B
Go
24 lines
334 B
Go
package debug
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
var (
|
|
PanicError = fmt.Errorf("panic")
|
|
)
|
|
|
|
type PanicErrorMessage struct {
|
|
Msg interface{}
|
|
Inner string
|
|
Stacktrace []byte
|
|
}
|
|
|
|
func (e *PanicErrorMessage) Error() string {
|
|
return fmt.Sprintf("%s", e.Inner)
|
|
}
|
|
|
|
func (e *PanicErrorMessage) Unwrap() []error {
|
|
return []error{PanicError}
|
|
}
|