mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Merge 3d2f51eeb4 into e69ee69218
This commit is contained in:
commit
3e9d361ba5
1 changed files with 10 additions and 3 deletions
|
|
@ -1365,8 +1365,16 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
|
||||||
/*
|
/*
|
||||||
* Log a message to the Mozilla JS error console
|
* Log a message to the Mozilla JS error console
|
||||||
*
|
*
|
||||||
* |type| is a string with one of the flag types in nsIScriptError:
|
* |type| is a string matching one of the flag constants on nsIScriptError.
|
||||||
* 'error', 'warning', 'exception', 'strict'
|
* As of Firefox 140 ESR only three are defined:
|
||||||
|
* 'error' -> errorFlag (0x0, default)
|
||||||
|
* 'warning' -> warningFlag (0x1)
|
||||||
|
* 'info' -> infoFlag (0x8)
|
||||||
|
* The legacy 'exception' and 'strict' values have been removed upstream;
|
||||||
|
* passing them yields an undefined flag and silently falls back to errorFlag.
|
||||||
|
*
|
||||||
|
* |sourceLine| is no longer accepted by nsIScriptError.init(), but is kept
|
||||||
|
* in the signature for compatibility with older Zotero.log() callers.
|
||||||
*/
|
*/
|
||||||
this.log = function (message, type, sourceName, sourceLine, lineNumber, columnNumber) {
|
this.log = function (message, type, sourceName, sourceLine, lineNumber, columnNumber) {
|
||||||
var scriptError = Components.classes["@mozilla.org/scripterror;1"]
|
var scriptError = Components.classes["@mozilla.org/scripterror;1"]
|
||||||
|
|
@ -1380,7 +1388,6 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
|
||||||
scriptError.init(
|
scriptError.init(
|
||||||
message,
|
message,
|
||||||
sourceName ? sourceName : null,
|
sourceName ? sourceName : null,
|
||||||
sourceLine != undefined ? sourceLine : null,
|
|
||||||
lineNumber != undefined ? lineNumber : null,
|
lineNumber != undefined ? lineNumber : null,
|
||||||
columnNumber != undefined ? columnNumber : null,
|
columnNumber != undefined ? columnNumber : null,
|
||||||
flags,
|
flags,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue