LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-threaded error handling method

Solved!
Go to solution
I have a multi-threaded application.  When an error occurs in any of the threads which causes the system to fail, all of the threads throw an error and display an error dialog box.  I am thinking about removing the call to the error handler in the secondary threads and instead send the error to the main thread for disposition.  Is that a common design pattern?  Is there a better way to do this?
0 Kudos
Message 1 of 2
(2,611 Views)
Solution
Accepted by topic author kc64

kc64 wrote:
I have a multi-threaded application.  When an error occurs in any of the threads which causes the system to fail, all of the threads throw an error and display an error dialog box.  I am thinking about removing the call to the error handler in the secondary threads and instead send the error to the main thread for disposition.  Is that a common design pattern?  Is there a better way to do this?

Not as common as it SHOULD be.

 

We use an Event Logger that passes all errors to a background process that logs them to file for review later. That is the minimum. If the errors a fatal then we adjust the app design to react accordingly when bad things happen.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,608 Views)