Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error report in case of typos in configuration file #31

Open
myrosia opened this issue Jul 9, 2015 · 0 comments
Open

Confusing error report in case of typos in configuration file #31

myrosia opened this issue Jul 9, 2015 · 0 comments

Comments

@myrosia
Copy link

myrosia commented Jul 9, 2015

I had a typo in my configuration file (an extra comma). This resulted in the following exception

    com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure: 
undefined:7
}
^
SyntaxError: Unexpected token }
    at Object.parse (native)
    at /afs/inf.ed.ac.uk/user/m/mdzikovs/research/ideal/software/gui/play-upgrade-branch/project/target/jshint/sbt-jshint-1.0.3.jar:30:24
    at Object.<anonymous> (/afs/inf.ed.ac.uk/user/m/mdzikovs/research/ideal/software/gui/play-upgrade-branch/project/target/jshint/sbt-jshint-1.0.3.jar:67:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)                                                                                                               
    at node.js:906:3

Eventually I figured out that the cause was coming from from jshint-shell.js line 30
var options = JSON.parse(stripJsonComments(args[OPTIONS_ARG]));

This helped me find the source (configuration file error). But it would be better if it was reported properly, because it is impossible to guess from the error message what the cause is.

@koppor koppor mentioned this issue Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant