olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

Rethrown Errors give a difficult stacktrace #28

Closed s6577t closed 12 years ago

s6577t commented 12 years ago

When application code throws an exception, Davis catches and rethrows the exception. The Chrome console reports the exception as coming from Davis which it technically does, it would be more useful if the original stack trace was used.

olivernn commented 12 years ago

I think this is actually a bug with Chrome. The error is being re-thrown in Davis rather than a new Error being created. Other browsers, including Safari, show the correct stack trace. I'm not sure there is a way to work around this currently unfortunately.