Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor Core Error Handler - User Defined Warnings?

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?

0 Kudos
Message 1 of 2
(3,306 Views)

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.

0 Kudos
Message 2 of 2
(2,964 Views)