Stop useless panicking in context and render (#2150)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
committed by
GitHub
parent
153b229fcc
commit
0c96a20209
@ -924,7 +924,9 @@ func (c *Context) Render(code int, r render.Render) {
|
||||
}
|
||||
|
||||
if err := r.Render(c.Writer); err != nil {
|
||||
panic(err)
|
||||
// Pushing error to c.Errors
|
||||
_ = c.Error(err)
|
||||
c.Abort()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user