In which script did the error occur?

I get an error:
SRUN_UnknownCommand - ERROR: No Handler Found for Command message: 'logoff'

for instance.

Is there something I can do to have the error message tell me in which script the error happened?

Thanks!
-edj

Comments

  • Eggplant should open the script highlight the line in the script that failed, or you could use the run window to isolate it.
  • Thank you for your reply.

    I see that the script I manually started is highlighted in the run window. But the error has occurred in some other script that was called by the one I started. If the call sequence is:
    script1 -> script2 -> scriptx

    where script1 is the script I started, it calls some script2 and then the error occurs in some scriptx. All I see is that a call from script1 generated the error. I would like it to tell me 'line y of script x' got an error.

    I have many scripts which have similar names in them and when I get an error that "CommonTask" failed, I would like to be pointed directly to the one of many scripts that contains the "CommonTask" routine that failed.

    -edj
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Eggplant should highlight the portion of the script where the error occurred. There was a known problem with this in an earlier version, though, and if there are still problems we'd like to know about them, so please submit a bug report (from the Help menu in Eggplant) and if possible send your scripts that are misbehaving.

    Having said that, if Eggplant fails to highlight the error, then the debugging capabilities included in the Run window will be your best aid in tracking down where the problem is occurring. Following an error, the frame popup at the top of the Run window should retain information about the call stack (which scripts were called by whom, unless the exception was caught by a try block and re-thrown).

    The popup will show "Done 1: ..." indicating that frame 1 (the initial script that was run) is no longer executing but is currently the one shown in the top half of the Run window. You can select different frames from this popup to follow the series of calls that were made.

    If this doesn't work for some reason, you can try inserting a PauseScript command somewhere in your script shortly before the place where the problem occurs, and then run the script and use the Step Into and Step Over buttons in the toolbar after the script pauses to step through the script one line at a time until you encounter the problem.
  • Thank you for your help.

    The tracing and animation settings seem to play a role in how much detail I get when an error occurs.

    I am definitely learning my way around in the debugging arena. I will drop this for now and just assume that everybody else just assumed that I 'of course' had full tracing on. :)

    -edj
Sign In or Register to comment.