locked
Message: Can't have 'break' outside of loop RRS feed

  • Question

  • I use gojs in my project, it's work well in my development ENV(windows 10/MVC/.NET 4.5), but throw error in production ENV(windows server 2008/MVC/.NET4.5), now I'm sure it's not gojs problem, it's my production ENV issue, see below document link and error message.

    It's obviously my server not support the break statement without switch/case, but I didn't use JScript in my project, still running well in windows10, even I use JScript dll in my project, the production ENV throw same error, now I'm confuse how to solve this issue.

    DOC link: https://msdn.microsoft.com/en-us/0bw81z75(v=vs.90)

    Message: Can't have 'break' outside of loop: break a
    Error code: JS1019
    Severity: 0
    Subcategory: run-time
    File: /Content/gojs/js/go.js
    Start line: 1350
    Start column: 316
    End line: 1350
    End column: 323

    Exception Message: BundleTransformer.MicrosoftAjax.MicrosoftAjaxParsingException: Message: Can't have 'break' outside of loop: break a
    Error code: JS1019
    Severity: 0
    Subcategory: run-time
    File: /Content/gojs/js/go.js
    Start line: 1350
    Start column: 316
    End line: 1350
    End column: 323


    Sunday, November 22, 2015 4:51 AM

Answers

  • Thanks April, the error throw by Microsoft Ajax, the JS file is normally, I solved it now, it's the Windows Server issue.
    • Proposed as answer by Kristin Xie Thursday, December 3, 2015 2:07 AM
    • Marked as answer by CaillenModerator Thursday, December 3, 2015 2:09 AM
    Friday, November 27, 2015 6:47 AM

All replies

  • Hi 0o小石头o0,

    According to the above description and the following link, I think you’d better first check the whether the break in go.js line 1350 is inside an enclosing loop or switch statement or not.

    https://msdn.microsoft.com/library/x7a73hyw(v=vs.94).aspx

    If the JS file is wrong, you could try to copy and replace the JS file from development ENV to production ENV.

    Since the error is about the gojs file, you could try to post your issue in the following form for more professional support. 

    http://forum.nwoods.com/c/gojs

    Best Regards.

    Monday, November 23, 2015 5:30 AM
  • Thanks April, the error throw by Microsoft Ajax, the JS file is normally, I solved it now, it's the Windows Server issue.
    • Proposed as answer by Kristin Xie Thursday, December 3, 2015 2:07 AM
    • Marked as answer by CaillenModerator Thursday, December 3, 2015 2:09 AM
    Friday, November 27, 2015 6:47 AM