Skip to content
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

Add robust exceptions #162

Open
montlebalm opened this issue Apr 4, 2014 · 1 comment
Open

Add robust exceptions #162

montlebalm opened this issue Apr 4, 2014 · 1 comment

Comments

@montlebalm
Copy link
Member

I've been thinking it could be really helpful to add very expressive and robust exceptions when something goes wrong in F2. Here's an example:

Error: "TypeError: undefined is not a function."
Explanation: "F2 was unable to load the AppClass for 'com_example_foo'."
Solution: "Make sure the script containing the AppClass is included and that the AMD module returns the AppClass function."

In a sense, the library's exceptions can be like a tutorial that guides users into the Pit of Success. We'll give them the actual error, what we were doing that caused it, and how we think it might be solved. We can also include links to relevant documentation that could point the user in the right direction.

These could be enabled all the time or through a DEBUG mode.

@montlebalm montlebalm added this to the 2.0 milestone Apr 4, 2014
@montlebalm montlebalm added the v2 label Apr 4, 2014
@markhealey
Copy link
Member

Good thinking @montlebalm. This'd be a good addition to the lib! Extending what you have, I personally like the feature in RequireJS that points you to the docs with further explanation on what went wrong. Example url included in common error with context: http://requirejs.org/docs/errors.html#notloaded

@brianbaker brianbaker added enhancement and removed v2 labels Jul 20, 2021
@brianbaker brianbaker removed this from the 2.0 milestone Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants