Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19029

Windows: If parsing JS files fails the error message does not contain a reason

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.0
    • Fix Version/s: Release 4.1.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Windows 8.1
      Ti CLI: 4.1.0-dev
      Ti SDK: 4.1.0.v20150614181235

    • Story Points:
      5
    • Sprint:
      2015 Sprint 12 Windows

      Description

      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

      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)
      

      When building for Android it will be surfaced as the following

      [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]
      

      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

      Actual Result

      The parser fails with the first error

      Expected Result

      The parser should fail with an error indicating the reason why

        Attachments

          Activity

            People

            • Assignee:
              kiguchi Kota Iguchi
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Christopher Williams
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19992
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code