I have noticed that when a tag value changed event script throws an error it is only logged in the gateway logs a single time. When the script runs again and throws the same error, it doesn’t show in the logs. I find this to be frustrating because if I don’t notice the error the first time it happens it is easy to miss any subsequent script failures when looking over the logs.
To (hopefully) recreate this I created a boolean memory tag, and a integer memory tag and put the following script on the boolean tag’s value changed event:
if not initialChange: i = system.tag.readBlocking(['[default]testInt']).value system.tag.writeBlocking(['[default]testInt'], [i + 1]) j = None j.thisDoesntExist = 1
When I run the script the first time, it increments the integer tag, then throws an AttributeError as you would expect. Then when I run the script again, it increments the integer tag, but does not throw the error again. Because the integer value was incremented I know the script ran, but it does not throw the error even though I would imagine the same exception was thrown.
The only way that I can find to get the script to throw the error again is to make a change to the script (even if it is just added a new line to the beginning of the code) and commit it before running the script again.
Does anyone know if this is intended behavior, or just a bug?