ITK icon indicating copy to clipboard operation
ITK copied to clipboard

BUG: Let DataObjectError override `ExceptionObject::Print`

Open N-Dekker opened this issue 1 month ago • 1 comments

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

N-Dekker avatar Nov 28 '25 17:11 N-Dekker

Thinking of how this went on for so long, I realized I never used DataObjectError. I guess most code uses itk::ExceptionObject.

DataObjectError is the base class of InvalidRequestedRegionError, which is thrown quite a few times (in more than 10 different places), in ITK/Modules. 🤷

N-Dekker avatar Nov 30 '25 22:11 N-Dekker

Thank you, Niels

dpshamonin avatar Dec 15 '25 11:12 dpshamonin