You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 thejson
package:go/src/encoding/json/decode.go
Lines 298 to 301 in 7eb7f8f
The text was updated successfully, but these errors were encountered: