Save the path in a crash
This commit is contained in:
parent
60c0baa9ab
commit
2a2c7bbc2f
@ -6,6 +6,7 @@ import "github.com/aerogo/nano"
|
||||
type Crash struct {
|
||||
Error string `json:"error"`
|
||||
Stack string `json:"stack"`
|
||||
Path string `json:"path"`
|
||||
|
||||
hasID
|
||||
hasCreator
|
||||
|
@ -36,6 +36,7 @@ func Recover(next aero.Handler) aero.Handler {
|
||||
crash := &arn.Crash{
|
||||
Error: err.Error(),
|
||||
Stack: stackString,
|
||||
Path: ctx.Path(),
|
||||
}
|
||||
|
||||
crash.ID = arn.GenerateID("Crash")
|
||||
|
@ -8,6 +8,7 @@ component Crashes(crashes []*arn.Crash)
|
||||
tr.mountable
|
||||
td
|
||||
a(href="/api/crash/" + crash.ID, target="_blank")= crash.Error
|
||||
td= crash.Path
|
||||
td
|
||||
each line in strings.Split(crash.Stack, "\n")
|
||||
p= line
|
||||
|
Loading…
Reference in New Issue
Block a user