Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add PANIC interception time

  • Loading branch information...
commit 7e7b58c0765423623c9c6e75ca700f500d30dd78 1 parent c229221
@robfig authored
Showing with 2 additions and 0 deletions.
  1. +1 −0  controller.go
  2. +1 −0  intercept.go
View
1  controller.go
@@ -118,6 +118,7 @@ func (c *Controller) Invoke(appControllerPtr reflect.Value, method reflect.Value
// This function handles a panic in an action invocation.
// It cleans up the stack trace, logs it, and displays an error page.
func handleInvocationPanic(c *Controller, err interface{}) {
+ c.invokeInterceptors(PANIC, reflect.ValueOf(c))
plugins.OnException(c, err)
stack := string(debug.Stack())
ERROR.Println(err, "\n", stack)
View
1  intercept.go
@@ -41,6 +41,7 @@ type InterceptTime int
const (
BEFORE InterceptTime = iota
AFTER
+ PANIC
)
type InterceptTarget int
Please sign in to comment.
Something went wrong with that request. Please try again.