Closed
Bug 1381194
Opened 8 years ago
Closed 8 years ago
SyntaxError: expected expression, got keyword 'else'
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: jmichae3, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643
Steps to reproduce:
large js code with large curly-bracketed if { ... } else { ... }
Actual results:
console error:
SyntaxError: expected expression, got keyword 'else'
given the context of an if statement, this is a mixed up, wrong error message for the type of statement that it is. occurred on keyword else.
Expected results:
should have shown me where the actual error was.
| Reporter | ||
Comment 1•8 years ago
|
||
please search or partial-search the js engine parser source for this string to find where bug is hiding.
| Reporter | ||
Comment 2•8 years ago
|
||
or engine strings db.
Comment 3•8 years ago
|
||
please provide a testcase.
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
Flags: needinfo?(jmichae3)
| Reporter | ||
Comment 4•8 years ago
|
||
I can't share the code with you because it's commercial.
Flags: needinfo?(jmichae3)
| Reporter | ||
Comment 5•8 years ago
|
||
did you do as I requested?
Comment 6•8 years ago
|
||
you don't have to provide whole code. reduced testcase that demonstrates the issue is sufficient.
please try creating minimal standalone testcase.
if you cannot provide any kind of testcase, there's no way to figure out what you're seeing.
Flags: needinfo?(jmichae3)
Comment 7•8 years ago
|
||
in most case, that error is thrown when there's unbalanced braces and "else" is placed after a block that is not after "if".
please also check if the code works on other browser.
Comment 8•8 years ago
|
||
It had an insufficient test cases, didnot contain the entiere code and made the script ended with the error.
Updated•8 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 9•8 years ago
|
||
closing due to lack of response.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jmichae3)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•