Omit compile errors

Posted by Rmf113 on Wed 19 Sep 2012 04:33 PM — 2 posts, 11,626 views.

#0
Is there a way to turn off error reporting so that compile errors do not appear? At present I only see 2 options..

Errors appear in an error window which takes the focus away frrm the main window or..

Errors appearing in Note form in the main window which clutters up the output.

I know the obvious response will be to fix whatever is causing the compile error but it is timing related and I don't have the time to find a workaround at the moment so would just prefer to be oblivious to the errors for the time being if there is an easy way to do this?
Australia Forum Administrator #1
Is this in a trigger or plugin or something?

Do you really mean compile errors or runtime errors?

You can do a pcall of a function that catches errors:

http://www.gammon.com.au/scripts/doc.php?lua=pcall


The error could then be ignored, written to a disk file or something.

The errors in note form which "clutter up the output" must be happening a lot for it to be annoying. I would be trying to fix it, or at least change the code that if the error condition occurs, it jumps around that part. eg.


if foo then
 
  -- do this only if foo is not-nil
  
end -- if