Skip to content

Commit

Permalink
fix some error on panic handler
Browse files Browse the repository at this point in the history
  • Loading branch information
0c34 committed Oct 27, 2017
1 parent 060d2e8 commit 05a888f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions util/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ func (this *Class)CapturePanic(h httprouter.Handle) httprouter.Handle {
switch t := r.(type) {
case string:
err = errors.New(t)
log.Println("error string")
case error:
err = t
log.Println("error t")
default:
err = errors.New("Unknown error")
}
Expand Down

0 comments on commit 05a888f

Please sign in to comment.