Showing results for 
Search instead for 
Did you mean: 

Error/Warning Handling for the Actor Framework



For the past two weeks I have been learning about the Actor Framework and how to use it. It has a lot of great features, but there is one key thing that I am trying to figure out that I cannot get. For all of my actors, I want to log all errors and all warnings to a central error logger. My initial thought was to create an extension class of the Actor Framework and to override “Handle”. However, “Handle” is only called if there is an error. This means that all warnings will be lost. The only way I can think of to get the behavior I want would be to make a modification to Actor by removing the case structure around “Handle”. This is undesirable as doing this requires making a modification to Actor Framework.lvlib, moving it, version controlling it, etc…


My question is: does anyone have any other ideas on how I could get around this problem? A change of perspective could really help







0 Kudos
Message 1 of 15

Hi Carlo


GIven the relative youth of this framework, I would highly suggest posting to the community group as it is more geared towards this framework than the general LabVIEW forums. You can find this here:

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 2 of 15

You're right that modifying the VI is a problem, but people have been making all kinds of modifications and you can see that the VI even has a comment on how to do it and you can see how people went about modifying the AF in the group linked to ealier. The only thing which I can think of (other than your suggestion) is to put this in the message class. Create your own parent for the message which will implement this logging in the Do VI and mark child classes as having to call the parent. The problem with that is that this seems like it should belong in the actor and you can't force the users to call the parent at the end of the VI or wire the error into it.


I would suggest overriding the actor core completely, but that won't work because the priority queue doesn't have accessors, so you can't get at it.

Try to take over the world!
0 Kudos
Message 3 of 15

Well I thought about making creating a child class which does this, but there is one significant roadblock that is annoying. Every time you would used the "Actor Framework Message Make" to make a new message, you will need to make that class a child of the modified Message Class which does the Error Handling after I have managed to get by only making one change to Actor I only removed the case structure around Handle Then, I created an Actor extension class that overrides Handle to do my error/warning logging. All Actors I make are children of my Actor extension class.

0 Kudos
Message 4 of 15

I tried posting there, but I was told that I can only make a private discussion. I ended posting a private discussion, but not much discussion occured. Is there something I am missing to post public discussions?

0 Kudos
Message 5 of 15

I don't see you in the members list. Maybe you have to join the group to post there.

0 Kudos
Message 6 of 15

Another way to go: you could modify Message Maker's template. Put a small VI to the right of the error case that turns warnings into an error with a specific custom error code, and the warning cluster stuffed into the Source field.

C:\Program Files (x86)\National Instruments\LabVIEW 2012\project\_Message Maker\_templates\Message Template\


0 Kudos
Message 7 of 15

That is true. But then either way, I need to modify the original class in vi.lib. I want to avoid that as much as possible. For now, I just removed the case structure in Actor I have created a basic actor extension class that overrides Handle to implement the error logging I need. Also, it makes more sense for the Actor to be responsible for logging errors, not the message.




0 Kudos
Message 8 of 15

Sure, I was just thinking about it. This doesn't modify anything in vi.lib - just the template, which is in a different place. Turn a warning into an error, then log it in a "Handle" or "Handle Last Ack" override.

warning as error.png

0 Kudos
Message 9 of 15

Thanks for the reply. So what I mean by "I do no want to modify anything in vi.lib" is I do not want to modify anything that is referenced from a static location on the computer. In the production environment where I work, we need to deploy our code to multiple computer seemlessly. Modifying code in the locations you mentioned would mean somehow version controlling code in C:\Program Files (x86)\National Instruments\... . 

0 Kudos
Message 10 of 15