ITK
ITK copied to clipboard
BUG: Let DataObjectError override `ExceptionObject::Print`
Instead of introducing a new virtual member function, DataObjectError::PrintSelf.
It is essential that DataObjectError overrides ExceptionObject::Print, because that is the member function that is called, when doing std::cerr << error for a DataObjectError.
- Fixes issue #5666
Thinking of how this went on for so long, I realized I never used
DataObjectError. I guess most code usesitk::ExceptionObject.
DataObjectError is the base class of InvalidRequestedRegionError, which is thrown quite a few times (in more than 10 different places), in ITK/Modules. 🤷
Thank you, Niels