Namespace: SC.ExceptionHandler
If an exception is thrown during execution of your SproutCore app, this object will be given the opportunity to handle it.
By default, a simple error message is displayed prompting the user to
reload. You could override the handleException
method to, for example, send
an XHR to your servers so you can collect information about crashes in your
application.
Since the application is in an unknown state when an exception is thrown, we rely on JavaScript and DOM manipulation to generate the error instead of using SproutCore views.
Defined in: exception_handler.js
- Since:
- SproutCore 1.5
Field Summary
- SC.ExceptionHandler.isShowingErrorDialog
Class Methods
Field Detail
SC.ExceptionHandler.isShowingErrorDialog Boolean- Default value:
- NO
Class Method Detail
Called when an exception is encountered by code executed using SC.run().
By default, this will display an error dialog to the user. If you want more sophisticated behavior, override this method.
- Parameters:
- exception Exception
- the exception thrown during execution