Open montlebalm opened 10 years ago
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
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:
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.