2 Replies Latest reply on Jul 5, 2006 3:18 AM by Sergey Lisovoy

    Exit from Director with error code

    Sergey Lisovoy
      Hi all!
      How can I exit from director with specifyed error code by using lingo or JavaScript syntax?

      I want to catch its error code in batch file for example to do something special.
      Sample batch file I want to use:

      myprojector.exe
      if %ERRORLEVEL% == 10 goto GO_TO_SOMETHING_WRONG

      But now, by default director quit with error code 0.

      Thanks in advance
        • 1. Re: Exit from Director with error code
          Level 7
          lis0x90 wrote:
          > How can I exit from director with specifyed error code by using lingo
          > or JavaScript syntax?
          >
          > I want to catch its error code in batch file for example to do
          > something special.
          > Sample batch file I want to use:
          >
          > myprojector.exe
          > if %ERRORLEVEL% == 10 goto GO_TO_SOMETHING_WRONG
          >
          > But now, by default director quit with error code 0.

          I don't know of any way to do that, but you could get the projector to
          create a (zero byte) file if there's an error and in the batch file check
          for the existence of that file. (Not forgetting to delete that file, if it
          exists, when the projector starts.)

          Andrew


          • 2. Re: Exit from Director with error code
            Sergey Lisovoy Level 1
            I have decided to write custom Xtra that can write messages to stdout. And parent application will catch it and parse error code from it.