B2G/gecko/browser/devtools/tilt/TiltUtils.jsm
/**
   * Logs an error to the console.
   *
   * @param {String} aMessage
   *                 the message to be logged
   * @param {Object} aProperties
   *                 and object containing script error initialization details
   */
Logs an error to the console.
@param {String} aMessage
the message to be logged
@param {Object} aProperties
and object containing script error initialization details
Logs an error to the console . @param { String } aMessage the message to be logged @param { Object } aProperties and object containing script error initialization details
function TUO_error(aMessage, aProperties)
  {
    if (this.suppressErrors) {
      return;
    }
    aProperties = aProperties || {};
    let consoleService = Cc["@mozilla.org/consoleservice;1"]
      .getService(Ci.nsIConsoleService);
    let scriptError = Cc["@mozilla.org/scripterror;1"]
      .createInstance(Ci.nsIScriptError);
    scriptError.init(aMessage,
      aProperties.sourceName || "",
      aProperties.sourceLine || "",
      aProperties.lineNumber || 0,
      aProperties.columnNumber || 0,
      aProperties.flags || 0,
      aProperties.category || "");
    consoleService.logMessage(scriptError);
  }
function TUO_error ( aMessage , aProperties ) { if ( this . suppressErrors ) { return ; } aProperties = aProperties || { } ; let consoleService = Cc [ "@mozilla.org/consoleservice;1" ] . getService ( Ci . nsIConsoleService ) ; let scriptError = Cc [ "@mozilla.org/scripterror;1" ] . createInstance ( Ci . nsIScriptError ) ; scriptError . init ( aMessage , aProperties . sourceName || "" , aProperties . sourceLine || "" , aProperties . lineNumber || 0 , aProperties . columnNumber || 0 , aProperties . flags || 0 , aProperties . category || "" ) ; consoleService . logMessage ( scriptError ) ; }
Logs an error to the console.
Logs an error to the console .
// make sure the properties parameter is a valid object // get the console service // get the script error service // initialize a script error // log the error