01-26-2016 06:27 PM
LabVIEW handles errors and warnings differently. In AF, if I want to create a warning by adding an error code but keep the error flag to false, I don't see how that would ever be handled. The error handler is only called when the error flag is true. Leads me to believe that if I ever want to display or otherwise indicate a warning, I need to set the error flag true and then override error handler method, perform action, and set the flag to false? Is there another way?
01-26-2016 06:42 PM
You would handle warnings yourself somewhere. Don't propagate them out on the error wire out of your methods. Warnings should either:
a) store them in your actor state that you are now under some sort of warning condition.
b) become a message you send to some other actor to say "I'm unstable, you have been warned."
c) are logged and forgotten
There's no built-in mechanism for escalation of warnings because they aren't errors -- the only correct behavior on a warning as it escalates is to literally do nothing about it. It's a warning, and a warning does require any acknowledgement, by definition.