Namespace goog.debug
code »Interfaces
|
Classes
|
Type Definitions
A message value that can be handled by a Logger.
Functions are treated like callbacks, but are only called when the event's
log level is enabled. This is useful for logging messages that are expensive
to construct.
Global Functions
code »goog.debug.catchErrors ( logFunc, opt_cancel, opt_target )Catches onerror events fired by windows and similar objects.
code »goog.debug.deepExpose ( obj, opt_showFn ) ⇒ string
Creates a string representing a given primitive or object, and for an
object, all its properties and nested objects. WARNING: If an object is
given, it and all its nested objects will be modified. To detect reference
cycles, this method identifies objects using goog.getUid() which mutates the
object.
string
Parameters |
---|
|
Returns |
obj . |
code »goog.debug.enhanceError ( err, opt_message ) ⇒ !Error
Converts an object to an Error if it's a String,
adds a stacktrace if there isn't one,
and optionally adds an extra message.
!Error
code »goog.debug.exposeArray ( arr ) ⇒ string
Recursively outputs a nested array as a string.
string
Parameters |
---|
|
Returns |
|
code »goog.debug.exposeException ( err, opt_fn ) ⇒ string
Exposes an exception that has been caught by a try...catch and outputs the
error with a stack trace.
string
code »goog.debug.fnNameResolver_ ( ) ⇒ string
Resolves functions to their names. Resolved function names will be cached.
string
code »goog.debug.getFunctionName ( fn ) ⇒ string
Gets a function name
string
Parameters |
---|
|
Returns |
|
code »goog.debug.getNativeStackTrace_ ( fn ) ⇒ ?string
?string
Parameters |
---|
|
code »goog.debug.getStacktrace ( opt_fn ) ⇒ string
Gets the current stack trace, either starting from the caller or starting
from a specified function that's currently on the call stack.
string
Parameters |
---|
|
Returns |
|
code »goog.debug.getStacktraceHelper_ ( fn, visited ) ⇒ string
Private helper for getStacktrace().
string
code »goog.debug.getStacktraceSimple ( opt_depth ) ⇒ string
Gets the current stack trace. Simple and iterative - doesn't worry about
catching circular references or getting the args.
string
Parameters |
---|
|
Returns |
|
code »goog.debug.makeWhitespaceVisible ( string ) ⇒ string
Makes whitespace visible by replacing it with printable characters.
This is useful in finding diffrences between the expected and the actual
output strings of a testcase.
string
Parameters |
---|
|
Returns |
|
code »goog.debug.normalizeErrorObject ( err ) ⇒ !Object
Normalizes the error/exception object between browsers.
!Object
Parameters |
---|
|
Returns |
|