UNPKG

p5

Version:

[![npm version](https://badge.fury.io/js/p5.svg)](https://www.npmjs.com/package/p5)

143 lines (142 loc) • 2.61 kB
//#region src/friendly_errors/browser_errors.js const errorTable = { ReferenceError: [ { msg: "{{}} is not defined", type: "NOTDEFINED", browser: "all" }, { msg: "Can't find variable: {{}}", type: "NOTDEFINED", browser: "Safari" }, { msg: "Cannot access '{{.}}' before initialization", type: "CANNOTACCESS", browser: "Chrome" }, { msg: "can't access lexical declaration '{{.}}' before initialization", type: "CANNOTACCESS", browser: "Firefox" } ], SyntaxError: [ { msg: "illegal character", type: "INVALIDTOKEN", browser: "Firefox" }, { msg: "Invalid character", type: "INVALIDTOKEN", browser: "Safari" }, { msg: "Invalid or unexpected token", type: "INVALIDTOKEN", browser: "Chrome" }, { msg: "Unexpected token '{{.}}'", type: "UNEXPECTEDTOKEN", browser: "Chrome" }, { msg: "expected {{.}}, got '{{.}}'", type: "UNEXPECTEDTOKEN", browser: "Chrome" }, { msg: "Identifier '{{.}}' has already been declared", type: "REDECLAREDVARIABLE", browser: "Chrome" }, { msg: "redeclaration of {} {{.}}", type: "REDECLAREDVARIABLE", browser: "Firefox" }, { msg: "Missing initializer in const declaration", type: "MISSINGINITIALIZER", browser: "Chrome" }, { msg: "missing = in const declaration", type: "MISSINGINITIALIZER", browser: "Firefox" }, { msg: "Illegal return statement", type: "BADRETURNORYIELD", browser: "Chrome" }, { msg: "return not in function", type: "BADRETURNORYIELD", browser: "Firefox" } ], TypeError: [ { msg: "{{.}} is not a function", type: "NOTFUNC", browser: "all" }, { msg: "Cannot read {{.}} null", type: "READNULL", browser: "Chrome" }, { msg: "{{.}} is null", type: "READNULL", browser: "Firefox" }, { msg: "Cannot read {{.}} undefined", type: "READUDEFINED", browser: "Chrome" }, { msg: "{{.}} is undefined", type: "READUDEFINED", browser: "Firefox" }, { msg: "Assignment to constant variable", type: "CONSTASSIGN", browser: "Chrome" }, { msg: "invalid assignment to const '{{.}}'", type: "CONSTASSIGN", browser: "Firefox" } ] }; const entryPoints = [ "setup", "draw", "deviceMoved", "deviceTurned", "deviceShaken", "doubleClicked", "mousePressed", "mouseReleased", "mouseMoved", "mouseDragged", "mouseClicked", "mouseWheel", "touchStarted", "touchMoved", "touchEnded", "keyPressed", "keyReleased", "keyTyped", "windowResized" ]; //#endregion export { entryPoints, errorTable };