panic in handler but retrun code 200
sevennt opened this issue · comments
Handler 中 panic,egin 却依然返回 200 code。
func Import(ctx *gin.Context) {
for _, s := range something {
Panic()
}
// 此处仍然能继续返回
ctx.JSON(200, map[string]interface{}{"result": "ok"})
}
func Panic(){
panic("don't panic")
}
所以可以关闭了么?