no usefull exception when trying to read an non-existent file using vtkImageReader2
When reading an image, no useful error is thrown when the file does not exist:
int main()
{
auto readerFactory = vtkSmartPointer<vtkImageReader2Factory>::New();
vtkSmartPointer<vtkImageReader2> imgReader;
imgReader.TakeReference(readerFactory->CreateImageReader2("doesnotexist"));
imgReader->SetFileName("doesnotexist");
}
gives: Access violation reading location 0x0000000000000000
would be nice to get something like: Unable to open "doesnotexist"