Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Modules/Core/Common/include/itkDataObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class ITKCommon_EXPORT DataObjectError : public ExceptionObject
* specific exception subtypes. The default is to print out the
* location where the exception was first thrown and any description
* provided by the "thrower". */
virtual void
PrintSelf(std::ostream & os, Indent indent) const;
void
Print(std::ostream & os) const override;

private:
DataObject * m_DataObject{ nullptr };
Expand Down Expand Up @@ -126,14 +126,6 @@ class ITKCommon_EXPORT InvalidRequestedRegionError : public DataObjectError

/** \see LightObject::GetNameOfClass() */
itkOverrideGetNameOfClassMacro(InvalidRequestedRegionError);

protected:
/** Print exception information. This method can be overridden by
* specific exception subtypes. The default is to print out the
* location where the exception was first thrown and any description
* provided by the "thrower". */
void
PrintSelf(std::ostream & os, Indent indent) const override;
};

/*----------------------------Data Object--------------------------------*/
Expand Down
10 changes: 3 additions & 7 deletions Modules/Core/Common/src/itkDataObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ DataObjectError::GetDataObject() const noexcept


void
DataObjectError::PrintSelf(std::ostream & os, Indent indent) const
DataObjectError::Print(std::ostream & os) const
{
ExceptionObject::Print(os);

const Indent indent{};

os << indent << "Data object: ";
if (m_DataObject)
{
Expand All @@ -99,12 +101,6 @@ InvalidRequestedRegionError::InvalidRequestedRegionError(const InvalidRequestedR
InvalidRequestedRegionError &
InvalidRequestedRegionError::operator=(const InvalidRequestedRegionError &) noexcept = default;

void
InvalidRequestedRegionError::PrintSelf(std::ostream & os, Indent indent) const
{
DataObjectError::PrintSelf(os, indent);
}

//----------------------------------------------------------------------------
DataObject::DataObject()
: m_SourceOutputName("")
Expand Down
Loading