Machine Vision

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

IMAQ Read Custom Data - C++ EH Exception

Highlighted

Colleagues (mostly from National Instruments),

 

The following code with IMAQ Read Custom Data throws C++ EH exception (once per second in this case):

 

Snippet.png

 

The reason is that the key named "TEST" is not exists.

Well, this is first chance exception which is correctly handled internally in VDM, but makes some troubles for debugging of my app.

Workaround is easy - call IMAQ Get Custom Keys, check if Key exists or not, then call IMAQ Read Custom Data only for existing key.

 

I just would like to notice that the Exceptions aren't a control mechanism, they generally reserved for truly exceptional circumstances (and missing key is not this case from my point of view).

There are also seems to be some rare exceptions throws during drawing in Vision Display.

Would be nice if this behavior will be changed in next release...

 

Andrey.

 

0 Kudos
Message 1 of 2
(1,156 Views)
Hi Andrey,

I can't find the CAR at the moment, but I believe it was already fixed for the next release.

Eric
0 Kudos
Message 2 of 2
(1,143 Views)