backbone-named-routes
backbone-named-routes copied to clipboard
Use proper and explanatory exceptions if to few parameter as awaited were passed
Right now passing too few or no params to a ...Path() function throws an error:
TypeError: Cannot call method 'charAt' of undefined
which isn't really descriptive + it breaks the rest of code.
I'd expect something like:
The route [route/:param] requires [:param] to be passed in arguments