azicchetti / jquerymobile-router

A router/controller for jquery mobile. Also adds support for client-side parameters in the hash part of the url. The routes handles regexp based routes. This plugin can be used alone or (better) with Backbone.js or Spine.js, because it's originally meant to replace their router with something integrated with jQM.
GNU General Public License v2.0
402 stars 69 forks source link

Adds better stack trace to error messages #67

Closed sukima closed 11 years ago

sukima commented 11 years ago

Found that in Chrome when an error happens in say a handler function the try/catch block would catch the error and pass it along to the debug() method. The problem is that when the debug function in turn does a console.log(err) it looses the stack trace and your not able to see what happened.

This might be the limitations of Chrome's console but adding the err.stack allows the developer a peek into the cause of any errors thrown.