-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The deserialization layer panics on invalid input. Bad state can take down the entire program currently. This PR updates `(*coroutine.Context).Unmarshal` to catch these panics and return an error value, allowing the caller to gracefully handle bad input. A better long term solution would be to abandon the `deserialize*()` functions and instead build the deserialization layer on the scanner introduced in #116, which avoids panics in many cases and could be updated to avoid panics in all cases.
- Loading branch information
Showing
2 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters