-
Notifications
You must be signed in to change notification settings - Fork 47.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve debugging DX when string coercions fail
If a coercion throws, the check function will now throw after it calls console.error(). It's the same exception that will be thrown after the check function returns, but by throwing it inside of the check function, it will be easier for callers to understand what happened and how to fix it. I added a bunch of comments above where it throws, so that callers who follow links from a call stack will see troubleshooting info. This commit also fixes a mistake where one block of DEV-only code wasn't included in an `if (__DEV__) {}` block.
- Loading branch information
1 parent
f7a0e55
commit 29bc544
Showing
1 changed file
with
43 additions
and
18 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