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 {
|
type Crash struct {
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
Stack string `json:"stack"`
|
Stack string `json:"stack"`
|
||||||
|
Path string `json:"path"`
|
||||||
|
|
||||||
hasID
|
hasID
|
||||||
hasCreator
|
hasCreator
|
||||||
|
@ -36,6 +36,7 @@ func Recover(next aero.Handler) aero.Handler {
|
|||||||
crash := &arn.Crash{
|
crash := &arn.Crash{
|
||||||
Error: err.Error(),
|
Error: err.Error(),
|
||||||
Stack: stackString,
|
Stack: stackString,
|
||||||
|
Path: ctx.Path(),
|
||||||
}
|
}
|
||||||
|
|
||||||
crash.ID = arn.GenerateID("Crash")
|
crash.ID = arn.GenerateID("Crash")
|
||||||
|
@ -8,6 +8,7 @@ component Crashes(crashes []*arn.Crash)
|
|||||||
tr.mountable
|
tr.mountable
|
||||||
td
|
td
|
||||||
a(href="/api/crash/" + crash.ID, target="_blank")= crash.Error
|
a(href="/api/crash/" + crash.ID, target="_blank")= crash.Error
|
||||||
|
td= crash.Path
|
||||||
td
|
td
|
||||||
each line in strings.Split(crash.Stack, "\n")
|
each line in strings.Split(crash.Stack, "\n")
|
||||||
p= line
|
p= line
|
||||||
|
Loading…
Reference in New Issue
Block a user