Project: titanium
Issue TIMOB-19029: Windows: If parsing JS files fails the error message does not contain a reason
h5.Description When the CLI is parsing the JS files of an app, if there is a parsing error then it is surfaced as the following {code} C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:197 throw new JS_Parse_Error(message, line, col, pos); ^ Error at new JS_Parse_Error (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:189:18) at js_error (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:197:11) at croak (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:656:9) at token_error (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:664:9) at expect_token (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:677:9) at expect (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:680:36) at expr_list (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:1172:44) at subscripts (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:1310:30) at subscripts (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:1287:20) at subscripts (C:\ProgramData\Titanium\mobilesdk\win32\4.1.0.v20150614181235\node_modules\uglify-js\lib\parse.js:1287:20) {code} When building for Android it will be surfaced as the following {code} [ERROR] Failed to parse C:\Users\Windo_000\Documents\Appcelerator_Studio_Workspace\testCreate\Resources\app.js [ERROR] Unexpected token punc «;», expected punc «,» [line 18, column 39] [ERROR] [ERROR] var doc = Ti.XML.parseString(xmlString; [ERROR] ---------------------------------------^ [ERROR] {code} h5.Steps To Reproduce 1. In an existing titanium project edit the app.js so that it will fail the parsing, remove a parentheses for example 2. Build the app for Windows h5.Actual Result The parser fails with the first error h5.Expected Result The parser should fail with an error indicating the reason why
Story points: 5