0 Replies Latest reply on Oct 16, 2012 5:41 AM by Stephen Horne

    Exceptions from script menus open ExtendScript Toolkit

    Stephen Horne

      I'm having trouble with exceptions thrown by scripts that appear in custom menus.

       

      Whenever an error is encountered when thrown by a script executed from one of these menus, it causes the ESTK to open and break on the offending line. For extra frustration, this happens even if the exception originates from within a try/catch block.

       

       

      To outline what is happening:

       

      I create a file, throw_error.jsx, in which I put one line:

       

      throw "error";

       

      When run from my menu, it opens the ESTK:

      https://www.evernote.com/shard/s204/sh/e2cd5bca-c92b-4a81-a138-db9a350ffeac/8c731f8af65155cf1fc1fed1b23f3069/res/98a8e70d-ff42-48c1-b8bc-71a89cb7b5da/skitch.png

       

       

      If I put this file in the scripts folder and run it from the scripts palette the exception is shown by the standard InDesign script-exception dialog:

      https://www.evernote.com/shard/s204/sh/e2cd5bca-c92b-4a81-a138-db9a350ffeac/8c731f8af65155cf1fc1fed1b23f3069/res/98a8e70d-ff42-48c1-b8bc-71a89cb7b5da/skitch.png

       

      Any ideas how to stop the ESTK catching the error?

       

      [Edit] Sorry, I can't get it to embed the images properly [/Edit]