Seadragon.Debug class

Version - Back to Seadragon Ajax Library

Overview

This static class provides convenience debugging functions.

Static Methods

Name and Signature Return Type Description
log(msg, important?) - If Seadragon.Config.debugMode is true, writes the given message to the browser's Javascript console. If the browser doesn't provide a Javascript console and the optional important parameter is true, alerts the message instead.
error(msg, exception?) - Writes the given message to the browser's Javascript console as an error message. If the browser doesn't provide a Javascript console, alerts the message if Seadragon.Config.debugMode is true. In either case, if Seadragon.Config.debugMode is true, provides fail-fast behavior by throwing an error to crash Seadragon. If an exception is given, the thrown error is the same exception, otherwise it is a new Error object with the given message.
fail(msg) - Alerts to the user the Seadragon.Strings "Errors.Failure" message, and throws an error to crash Seadragon.