-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't throw error and use Result<> in 1 function interface
Summary: Use just one way to report errors. Just use Result. Test Plan: unit tests. Verified by hand that peek() doesn't throw. out_of_range was just getting thrown from the small section of code I wrapped in try/catch Reviewed By: [email protected] Subscribers: trunkagent, doug, bmatheny, cgheorghe FB internal diff: D1653770 Signature: t1:1653770:1415321164:7a522255fe33ff54a5c31b32cf3636a5ba7bec79
- Loading branch information
Showing
2 changed files
with
34 additions
and
23 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