Skip to content
Snippets Groups Projects
Commit 999a21ee authored by Julien Malik's avatar Julien Malik
Browse files

BUG: fix #441 and #478 - remove exception specifier from itk::DataObject::PropagateRequestedRegion

PropagateRequestedRegion was throwing exception different than InvalidRequestedRegion,
causing the program to terminate immediately due to the exception specifier, at least with gcc.
Read http://www.gotw.ca/publications/mill22.htm for the gory details about exception specifiers.

In ITKv4 the exception specifier is already removed, that's why it is considered safe to apply
this patch.

In ITK, it has been removed for another reason :

commit 0ac0c19efa3ee3f4450f8d52f23a10a8eea21b96
Author: Cory Quammen <cquammen@cs.unc.edu>
Date:   Thu Jul 28 20:31:54 2011 -0400

    ENH: Fixed uninitialized member variable.

    Also added an exception if the boundary condition is not set when
    GenerateInputRequestedRegion() is called.

    To do this, the restriction to only exceptions of type
    InvalidRequestedRegionError thrown in PropagateRequestedRegion() was
    relaxed in itk::DataObject so that the method can throw exceptions of
    any type.

    Change-Id: Id55e3c73ca657734e0908400d5406a9c63913161
parent 90ac1cb1
No related branches found
No related tags found
No related merge requests found
...@@ -376,7 +376,7 @@ DataObject ...@@ -376,7 +376,7 @@ DataObject
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void void
DataObject DataObject
::PropagateRequestedRegion() throw (InvalidRequestedRegionError) ::PropagateRequestedRegion()
{ {
// If we need to update due to PipelineMTime, or the fact that our // If we need to update due to PipelineMTime, or the fact that our
// data was released, then propagate the update region to the source // data was released, then propagate the update region to the source
......
...@@ -357,7 +357,7 @@ public: ...@@ -357,7 +357,7 @@ public:
/** Methods to update the pipeline. Called internally by the /** Methods to update the pipeline. Called internally by the
* pipeline mechanism. */ * pipeline mechanism. */
virtual void PropagateRequestedRegion() throw (InvalidRequestedRegionError); virtual void PropagateRequestedRegion();
virtual void UpdateOutputData(); virtual void UpdateOutputData();
/** Reset the pipeline. If an exception is thrown during an Update(), /** Reset the pipeline. If an exception is thrown during an Update(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment