(exception)
| 242 | } |
| 243 | |
| 244 | error(exception) { |
| 245 | if (!this.output) throw exception |
| 246 | let stack = parseStack(exception.stack) |
| 247 | this.output.out("error", [String(exception) + (stack.length ? " (" + frameString(stack[0]) + ")" : "")]) |
| 248 | if (stack.length > 1) { |
| 249 | this.output.div.lastChild.appendChild(document.createTextNode(" ")) |
| 250 | let mark = this.output.div.lastChild.appendChild(document.createElement("span")) |
| 251 | mark.innerHTML = "…" |
| 252 | mark.className = "sandbox-output-etc" |
| 253 | mark.addEventListener("click", () => { |
| 254 | mark.className = "" |
| 255 | mark.innerHTML = "\n called from " + stack.slice(1).map(frameString).join("\n called from ") |
| 256 | }) |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | clearEvents() { |
| 261 | while (this.timeouts.length) this.win.clearTimeout(this.timeouts.pop()) |
no test coverage detected