Uncomment defer recover statement.
This commit is contained in:
parent
a68e4a6f5a
commit
57c1403300
|
@ -16,17 +16,14 @@ type decoder struct {
|
|||
}
|
||||
|
||||
func (d *decoder) decode(v interface{}) (err error) {
|
||||
var _ runtime.Error
|
||||
/*
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
if _, ok := e.(runtime.Error); ok {
|
||||
panic(e)
|
||||
}
|
||||
err = e.(error)
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
if _, ok := e.(runtime.Error); ok {
|
||||
panic(e)
|
||||
}
|
||||
}()
|
||||
*/
|
||||
err = e.(error)
|
||||
}
|
||||
}()
|
||||
|
||||
pv := reflect.ValueOf(v)
|
||||
if pv.Kind() != reflect.Ptr || pv.IsNil() {
|
||||
|
|
Loading…
Reference in New Issue