I'm going to resurrect a request for an On-Error process or more detailed (if possible) error information.
Specific case in point that I experience regularly:
- Tokenized scripts, about 12K in size with about 35-40 UDFs.
- Runs properly on tens of thousands of computers daily (about 90K computers, 80% Windows Workstations run this command).
- ONE agent on ONE day throws a "Missing ')'" or "missing argument" error on a line that isn't bad and is in a block that runs every day, not only under an odd condition. Some computers will throw this error repeatedly for a brief time, but it rarely lasts for more than a few days, making troubleshooting or even identification of the conditions difficult.
Several of these events will occur when you run a complex tokenized script with a different (newer) version of Kix32, so we specifically rename Kix32.exe and use a bat file (or internal code) to specifically invoke our renamed copy, which should eliminate that condition.
If an error handler is created, I would be able to dump vars from Main() and globals, and ideally - call a built-in Kix function to dump the var data from a function that was active when the error fired even if I had to add extra logic to my functions. An @ERRLINE and @ERRFUNC macro would be helpful.
Could this result in sloppy code? Possibly, but would there be any more than we already see?
Also - noticed the SKix32.exe Kix as a service request in the original post.. Um yeah! I have close to 30 scripts that run as system services via NSSM.EXE (used to use SrvAny).
_________________________
Actually I
am a Rocket Scientist!