-
Notifications
You must be signed in to change notification settings - Fork 47.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change DEV checks from throwing to console.error
This commit revises behavior of DEV string-coercion check functions to use console.error instead of throwing a TypeError. There will still be an exception thrown but it will be the being-coerced value that's doing the throwing. The reason to change to console.error is to pick up the component stack to make it easier for developers to find where in their code the problem resides. I'm still not sure if this is the right approach. It might be better to use console.error to get the component stack, and then to also throw in the check functions. Another approach could be to get the stack from the user code and throw a message that includes that stack.
- Loading branch information
1 parent
008ca28
commit f7a0e55
Showing
8 changed files
with
182 additions
and
185 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
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
Oops, something went wrong.