mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-04 19:27:45 +00:00
Update lrstanley/girc vendor (#884)
This commit is contained in:
15
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
15
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
@ -431,17 +431,27 @@ func recoverHandlerPanic(client *Client, event *Event, id string, skip int) {
|
||||
return
|
||||
}
|
||||
|
||||
var file string
|
||||
var file, function string
|
||||
var line int
|
||||
var ok bool
|
||||
|
||||
_, file, line, ok = runtime.Caller(skip)
|
||||
var pcs [10]uintptr
|
||||
frames := runtime.CallersFrames(pcs[:runtime.Callers(skip, pcs[:])])
|
||||
for {
|
||||
frame, _ := frames.Next()
|
||||
file = frame.File
|
||||
line = frame.Line
|
||||
function = frame.Function
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
err := &HandlerError{
|
||||
Event: *event,
|
||||
ID: id,
|
||||
File: file,
|
||||
Line: line,
|
||||
Func: function,
|
||||
Panic: perr,
|
||||
Stack: debug.Stack(),
|
||||
callOk: ok,
|
||||
@ -460,6 +470,7 @@ type HandlerError struct {
|
||||
ID string // ID is the CUID of the handler.
|
||||
File string // File is the file from where the panic originated.
|
||||
Line int // Line number where panic originated.
|
||||
Func string // Function name where panic originated.
|
||||
Panic interface{} // Panic is the error that was passed to panic().
|
||||
Stack []byte // Stack is the call stack. Note you may have to skip 1 or 2 due to debug functions.
|
||||
callOk bool
|
||||
|
Reference in New Issue
Block a user