error trapping for scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking into a way to trap certain errors, if possible, during a script (*.scr) execution.
For example:
Lets say you try opening a file, but it's open by another user and acad starts asking if you wish to open it read-only. However you did not account for the question with your script, so it goes south with "yes or no please" and/or an "unknown command".
Leaving my progressbar on screen, sdi on & filedia off.
I'm using a function to open the files (which actually checks for the example situation & more, but that aside) which has it's local *error* trap, but that's not invoked.
Nor does a redefine of the regular global *error* trap at the beginning of my script seem to get called. The function is there to prevent this, but during my tests while rewriting my script generator it sometimes fails & i'm stuck with a never completing progressbar (which comes with DOSlib).
Is there any (other?) way to catch those errors, so i can restore my settings when the script fails?