I encountered a never ending "Loading" dialog when moving from one page to the next, because the next page had a JS error in it.
Is there a way to avoid the loading message and instead show an error message?
Edit: To clarify, I am looking for a solution that displays an error message to the user (like "We encountered a problem. Please contact the system administrator"). It would also be great to return to the previous page, so a user can continue to use the app. As it is right now, a JS error stops them cold in their tracks.