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 ) ⇒ stringCreates 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 ) ⇒ !ErrorConverts an object to an Error if it's a String,
adds a stacktrace if there isn't one,
and optionally adds an extra message.
!Errorcode »goog.debug.exposeArray ( arr ) ⇒ stringRecursively outputs a nested array as a string.
string| Parameters |
|---|
|
| Returns |
|
code »goog.debug.exposeException ( err, opt_fn ) ⇒ stringExposes an exception that has been caught by a try...catch and outputs the
error with a stack trace.
stringcode »goog.debug.fnNameResolver_ ( ) ⇒ stringResolves functions to their names. Resolved function names will be cached.
stringcode »goog.debug.getFunctionName ( fn ) ⇒ stringGets a function name
string| Parameters |
|---|
|
| Returns |
|
code »goog.debug.getNativeStackTrace_ ( fn ) ⇒ ?string
?string| Parameters |
|---|
|
code »goog.debug.getStacktrace ( opt_fn ) ⇒ stringGets 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 ) ⇒ stringPrivate helper for getStacktrace().
stringcode »goog.debug.getStacktraceSimple ( opt_depth ) ⇒ stringGets 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 ) ⇒ stringMakes 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 ) ⇒ !ObjectNormalizes the error/exception object between browsers.
!Object| Parameters |
|---|
|
| Returns |
|