This is probably easy question, but I was looking (without success) for option to disable log errors in script. I made some scripts that occasionally returns some errors in specific situations (but still works good when needed). Is any way to place command into script that disables logging errors from JScript? The only option I found is "script_output_level" in advanced configuration - but there is no "None" option. Probably there is something like @ before commands in php, but my knowledge of JScript is small.
Do you mean script exceptions which break the execution or errors you catch and output yourself?
More ignore than catch. I don't want to see blinking exclamation mark for errors on selected scripts. This happens in my script rarely and in cases that I really don't must fix it (works when needed).
You should be able to handle most exceptions in your script yourself by using try-catch blocks around the code passages in question. I use XLog in conjunction with the general error handling of JS (try-catch) to control error and general output from my scripts: [Helper: XLog (versatile logging approach for DO scripting))
It allows you to fine tune script output from verbose to none, externally from a button or when used from inside the script (or its config). You also have the choice to mute/increase output for all the scripts that make use of XLog or for specific ones only (iirc).
What you cannot prevent from being visible in the DO output pane is when your script has severe syntax/parsing errors and the script engine is not able to parse it (happens quite easily after editing and saving it externally), but that's the only situation where you are out of control about what is visible from/about your script in the output pane.
Well, I don't understand that XLog, but... I read about that try - catch and it's working. This is not syntax error problem, so it's working. Thank you.
The day will come and you will understand. o)
Logging of script failures can't be turned off. You're meant to fix the script so it handles the unexpected cases in some way (even if it's just exiting the script), not turn off error reporting.
I know. I was trying to fix any bugs but sometimes I just can't. Too much conditions sometimes like in my last script where I was trying to keep one single lister as destination, no matter if I open new lister or change, or activate etc. - I get some error sometimes if the only one lister left or when I close last one except this destination... Too much to check and it works even if in 2% cases I get some error. In the future I'll probably fix that in code, add some new conditions, new checks. But for now I can't even proper reproduce when it happens. Will be much simplier btw. if onActivateLister returns ID only lister that is really activated, not two listers (source and destination).