<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I was wondering if anyone can give some advice on VTK and error / exception handling. For example, if I have something like this:</DIV>
<DIV> </DIV>
<DIV>vtkSmartPointer<vtkImageReader> imageReader = vtkSmartPointer<vtkImageReader>::New();<BR>imageReader->SetFileName("NoSuchFile.bin");<BR>... etc<BR>imageReader->Update();</DIV>
<DIV> </DIV>
<DIV>NoSuchFile.bin does not exist. Now when Update is executed an error window pops up (which I can remove by setting a vtkFileOutputWindow instead), but how can I checked programmatically that the Update did not succeed due to the file not being found or out of memory, etc? I have tried, try/catch and GetErrorCode (which always seems to return 0?) and looked through the books but there is no mention of error handling.</DIV>
<DIV> </DIV>
<DIV>John</DIV>
<DIV> </DIV></BODY></HTML>