goog.Disposable | |
goog.debug.ErrorHandler | goog.Disposable |
handler
: Function
Handler for exceptions.
|
![]()
No description.
|
code » | ||
Get the index for a function. Used for internal indexing.
|
code » | ||
Helps
#protectEntryPoint by actually creating the protected
wrapper function, after #protectEntryPoint determines that one does
not already exist for the given function. Can be overriden by subclasses
that may want to implement different error handling, or add additional
entry point hooks.
|
code » | ||
Private helper function to return a span that can be clicked on to display
an alert with the current stack trace. Newlines are replaced with a
placeholder so that they will not be html-escaped.
|
code » | ||
Installs exception protection for an entry point function. When an exception
is thrown from a protected function, a handler will be invoked to handle it.
|
code » | ||
![]()
Helper function for protecting a function that causes a function to be
asynchronously called, for example setTimeout or requestAnimationFrame.
Arguments:
|
code » | ||
![]()
Install exception protection for window.requestAnimationFrame to handle
exceptions.
|
code » | ||
![]()
Install exception protection for window.setInterval to handle exceptions.
|
code » | ||
![]()
Installs exception protection for window.setTimeout to handle exceptions.
|
code » | ||
![]()
Enable tracers when instrumenting entry points.
Arguments:
|
code » | ||
![]()
Set whether to add a prefix to all error messages that occur in protected
functions.
Arguments:
|
code » | ||
![]()
Set whether to wrap errors that occur in protected functions in a
goog.debug.ErrorHandler.ProtectedFunctionError.
Arguments:
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » |
![]()
Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.
Arguments:
|
code » | |||
![]()
Disposes of the object. If the object hasn't already been disposed of, calls
#disposeInternal . Classes that extend goog.Disposable should
override #disposeInternal in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void
Nothing.
|
code » | |||
![]()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() { mypackage.MyClass.base(this, 'constructor'); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { // Dispose logic specific to MyClass. ... // Call superclass's disposeInternal at the end of the subclass's, like // in C++, to avoid hard-to-catch issues. mypackage.MyClass.base(this, 'disposeInternal'); }; |
code » | |||
Use
#isDisposed instead.
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
![]()
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
![]()
Whether to add tracers when instrumenting entry points.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Handler for exceptions, which can do logging, reporting, etc.
|
Code » | |
![]()
Whether to add a prefix to all error messages. The prefix is
goog.debug.ErrorHandler.ProtectedFunctionError.MESSAGE_PREFIX. This option
only has an effect if this.wrapErrors_ is set to false.
|
Code » | |
![]()
Whether errors should be wrapped in
goog.debug.ErrorHandler.ProtectedFunctionError before rethrowing.
|
Code » |
![]()
No description.
|
Code » |