Source code

Revision control

Copy as Markdown

Other Tools

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
"use strict";
const stubs = new Map();
stubs.set("SimpleError", {
type: "object",
actor: "server1.conn1.child1/obj1020",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "Error message",
stack: "@debugger eval code:1:13\n",
fileName: "debugger eval code",
lineNumber: 1,
columnNumber: 13,
},
});
stubs.set("MultilineStackError", {
type: "object",
actor: "server1.conn1.child1/obj1021",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "bar",
stack:
"errorBar@debugger eval code:6:15\n" +
"errorFoo@debugger eval code:3:3\n" +
"@debugger eval code:8:1\n",
fileName: "debugger eval code",
lineNumber: 6,
columnNumber: 15,
},
});
stubs.set("ErrorWithoutStacktrace", {
type: "object",
actor: "server1.conn1.child1/obj1020",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "Error message",
},
});
stubs.set("EvalError", {
type: "object",
actor: "server1.conn1.child1/obj1022",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "EvalError",
message: "EvalError message",
stack: "@debugger eval code:10:13\n",
fileName: "debugger eval code",
lineNumber: 10,
columnNumber: 13,
},
});
stubs.set("InternalError", {
type: "object",
actor: "server1.conn1.child1/obj1023",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "InternalError",
message: "InternalError message",
stack: "@debugger eval code:11:13\n",
fileName: "debugger eval code",
lineNumber: 11,
columnNumber: 13,
},
});
stubs.set("RangeError", {
type: "object",
actor: "server1.conn1.child1/obj1024",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "RangeError",
message: "RangeError message",
stack: "@debugger eval code:12:13\n",
fileName: "debugger eval code",
lineNumber: 12,
columnNumber: 13,
},
});
stubs.set("ReferenceError", {
type: "object",
actor: "server1.conn1.child1/obj1025",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "ReferenceError",
message: "ReferenceError message",
stack: "@debugger eval code:13:13\n",
fileName: "debugger eval code",
lineNumber: 13,
columnNumber: 13,
},
});
stubs.set("SyntaxError", {
type: "object",
actor: "server1.conn1.child1/obj1026",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "SyntaxError",
message: "SyntaxError message",
stack: "@debugger eval code:14:13\n",
fileName: "debugger eval code",
lineNumber: 14,
columnNumber: 13,
},
});
stubs.set("TypeError", {
type: "object",
actor: "server1.conn1.child1/obj1027",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "TypeError",
message: "TypeError message",
stack: "@debugger eval code:15:13\n",
fileName: "debugger eval code",
lineNumber: 15,
columnNumber: 13,
},
});
stubs.set("URIError", {
type: "object",
actor: "server1.conn1.child1/obj1028",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "URIError",
message: "URIError message",
stack: "@debugger eval code:16:13\n",
fileName: "debugger eval code",
lineNumber: 16,
columnNumber: 13,
},
});
/**
* Example code:
* try {
* var foo = document.querySelector("foo;()bar!");
* } catch (ex) {
* ex;
* }
*/
stubs.set("DOMException", {
type: "object",
actor: "server2.conn2.child3/obj32",
class: "DOMException",
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 0,
preview: {
kind: "DOMException",
name: "SyntaxError",
message: "'foo;()bar!' is not a valid selector",
code: 12,
result: 2152923148,
filename: "debugger eval code",
lineNumber: 1,
columnNumber: 0,
},
});
stubs.set("base-loader Error", {
type: "object",
actor: "server1.conn1.child1/obj1020",
class: "Error",
isError: true,
ownPropertyLength: 4,
},
});
stubs.set("longString stack Error", {
type: "object",
actor: "server1.conn2.child1/obj33",
class: "Error",
isError: true,
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 4,
},
});
stubs.set("longString stack Error - cut-off location", {
type: "object",
actor: "server1.conn1.child1/obj33",
class: "Error",
isError: true,
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 6,
},
});
stubs.set("Error with V8-like stack", {
type: "object",
actor: "server1.conn1.child1/obj1020",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "BOOM",
stack: "Error: BOOM\ngetAccount@http://moz.com/script.js:1:2",
lineNumber: 1,
columnNumber: 2,
},
});
stubs.set("Error with invalid stack", {
type: "object",
actor: "server1.conn1.child1/obj1020",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "bad stack",
stack: "bar\nbaz\nfoo\n\n\n\n\n\n\n",
lineNumber: 1,
columnNumber: 2,
},
});
stubs.set("Error with undefined-grip stack", {
type: "object",
actor: "server0.conn0.child1/obj88",
class: "Error",
isError: true,
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "InternalError",
message: "too much recursion",
stack: {
type: "undefined",
},
fileName: "debugger eval code",
lineNumber: 13,
columnNumber: 13,
},
});
stubs.set("Error with undefined-grip name", {
type: "object",
actor: "server0.conn0.child1/obj88",
class: "Error",
isError: true,
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: {
type: "undefined",
},
message: "too much recursion",
stack: "@debugger eval code:16:13\n",
fileName: "debugger eval code",
lineNumber: 13,
columnNumber: 13,
},
});
stubs.set("Error with undefined-grip message", {
type: "object",
actor: "server0.conn0.child1/obj88",
class: "Error",
isError: true,
extensible: true,
frozen: false,
sealed: false,
ownPropertyLength: 4,
preview: {
kind: "Error",
message: { type: "undefined" },
stack: "@debugger eval code:16:13\n",
fileName: "debugger eval code",
lineNumber: 13,
columnNumber: 13,
},
});
stubs.set("Error with stack having frames with multiple @", {
type: "object",
actor: "server1.conn1.child1/obj1021",
class: "Error",
isError: true,
ownPropertyLength: 4,
preview: {
kind: "Error",
name: "Error",
message: "bar",
stack:
fileName: "from-npm.js",
lineNumber: 6,
columnNumber: 15,
},
});
module.exports = stubs;