Skip to content

Commit

Permalink
replace report() with p5._friendlyError()
Browse files Browse the repository at this point in the history
  • Loading branch information
outofambit committed Jun 20, 2021
1 parent ec3b2b7 commit 1007c43
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/friendly_errors/fes_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
let errSym = matchedError.match[1];
let url =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter#what_went_wrong';
report(
p5._friendlyError(
translator('fes.globalErrors.syntax.redeclaredVariable', {
symbol: errSym,
url
Expand All @@ -746,7 +746,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
case 'MISSINGINITIALIZER': {
let url =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const#what_went_wrong';
report(
p5._friendlyError(
translator('fes.globalErrors.syntax.missingInitializer', {
url
})
Expand All @@ -756,7 +756,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
case 'BADRETURNORYIELD': {
let url =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield#what_went_wrong';
report(
p5._friendlyError(
translator('fes.globalErrors.syntax.badReturnOrYield', {
url
})
Expand Down Expand Up @@ -798,7 +798,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
let errSym = matchedError.match[1];
let url =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init#what_went_wrong';
report(
p5._friendlyError(
translator('fes.globalErrors.reference.cannotAccess', {
url,
symbol: errSym,
Expand Down Expand Up @@ -855,7 +855,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property#what_went_wrong';
let url2 =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null';
report(
p5._friendlyError(
translator('fes.globalErrors.type.readFromNull', {
url1,
url2,
Expand All @@ -875,7 +875,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property#what_went_wrong';
let url2 =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined#description';
report(
p5._friendlyError(
translator('fes.globalErrors.type.readFromUndefined', {
url1,
url2,
Expand All @@ -892,7 +892,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
case 'CONSTASSIGN': {
let url =
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment#what_went_wrong';
report(
p5._friendlyError(
translator('fes.globalErrors.type.constAssign', {
url,
location: locationObj
Expand Down

0 comments on commit 1007c43

Please sign in to comment.