-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX beta] Improve error for improper invocations of link-to. #14554
Conversation
* In some future state we should be able to use a "feature flag" | ||
* which allows us to strip this without needing to call it twice. | ||
* | ||
* if (isProdBuild()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe either the truthy/falsey blocks should be flip/flopped or this conditional should be changed to isDebugBuild()
(since we want to do the most performant thing in prod mode)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely wrote the wrong thing. Adjusting.
This looks great, I have visions of threading through the callsite information so we can show template module name and line number info as well, but this is a great improvement already. |
921f935
to
f13e4f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, definitely a better error message than the default one...
@rwjblue Note that the error, by including |
f13e4f7
to
14164a2
Compare
K, we're good here. |
Awesome, thank you @nathanhammond! |
Unfortunately, to get decent error messages, we need to do something like this. In some future state we should be able to use a "feature flag" which allows us to strip this without needing to call it twice.