Click or drag to resize

Telogis.GeoBase.Console

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Console Namespace

Manages a diagnostic console for displaying messages about program execution and flow throughout the lifetime of the application.

Functions
NameDescription
error (String text)

Outputs a line of text to the console, prefixed by some standard warning flag defined by Console.ERROR_PREFIX.

Arguments
  • text (String) - The details of the error to display.

getErrorCount ()

Finds the number of error messages that have been printed to the console in the current session.

Returns

Number - The error message count.

getWarningCount ()

Finds the number of warning messages that have been printed to the console in the current session.

Returns

Number - The warning message count.

off ()

Prevents the console from displaying output. This remains in effect until Console.redirect or Console.on is next called.

on ()

Restores the callback the console was being used with before it was turned off. See Console.off.

redirect (Function newCallback)

Changes where the console's output is being directed.

Arguments
  • newCallback (Function) - The function to call to display output. This should take a line of text as a parameter. If not supplied, output is redirected to the standard console.log.

resetErrorCount ()

Sets the error count back to zero.

resetWarningCount ()

Sets the warning count back to zero.

warn (String text)

Outputs a line of text to the console, prefixed by some standard warning flag defined by Console.WARNING_PREFIX.

Arguments
  • text (String) - The details of the warning to display.

writeLine (String text)

Outputs a line of text to the console, followed by a newline.

Arguments
  • (Optional) text (String) - The text to display. Defaults to ''.

Properties
NameTypeDescription
ERROR_PREFIXString

The text to be prepended to the body of an error message.

Defaults to '** error: '.
WARNING_PREFIXString

The text to be prepended to the body of a warning message.

Defaults to '** warning: '.