LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JeffreyH

Custom automatic error handling callback

Status: New

I often have code in my apps where some error-out nodes are not wired, simply because the errors are generally not of interest to me or the error wiring would clutter up my block diagram. Typically this happens a lot in UI handling code where a lot of property nodes are used. For these parts I would rely on the automatic error handling for debugging purposes. One of the drawbacks of this method is that program execution is suspended when the automatic error handler kicks in. Even worse if this happens for code that is in a loop. You're only option then would be to abort the app, which e.g. is no good for your reference-based objects, etc.

 

I would love to have the ability to just specify my own 'Automatic Error Handler', enabling me to decide what to do with the unhandled errors. Just logging them is what first comes to mind, but maybe also do some special stuff depending on the type of error, just like a 'normal' error handler. I want to be in control!

 

Added values of this is that your application then has a catch-all error handler which enables you to at least log every error that occurs, even if not wired through. (Everyone forgets to wire some error-out that they actually did want to wire one time or another don't they? ;-))

 

Ofcourse the proposed setting in the image would ideally also be available programmatically by application property nodes.

 

21-4-2013 22-55-19.png

1 Comment
avogadro5
Active Participant

Fresh off my Nth debugging journey that ended at an unwired error terminal (not my code!), I marvel at how tied up this rather simple (and popular!) ask got in demanding a perfect solution. Can't we get anything to pick up these unwired errors in RTE?

 

I would rather be able to opt into crashing into something like the access violation dialog than what we have now which is nothing.

 

Edit: I find the "you must always wire your errors" concept extremely burdensome: other languages do you the valuable service of crashing anytime you don't handle your exceptions