Closed
Description
The current logic in json/decode.go
does the following:
go/src/encoding/json/decode.go
Lines 173 to 178 in 7eb7f8f
This captures any panics that aren't runtime.Error
, which is arguably a wider range of panics than should be captured. For example, a panic in the reflect package gets masked away as an error.
The logic in decodeState.error
should wrap the error before panicking to ensure the recover only captures errors originating from the json
package:
go/src/encoding/json/decode.go
Lines 298 to 301 in 7eb7f8f