Skip to content

Commit 851d543

Browse files
committed
STYLE: Catch exceptions by _const_ reference
Replaced `catch \((\S+) &` & with `catch \(const $1 &`, using Notepad++ v8.3.3, Find in Files, Search Mode: Regular expression. Follow-up to ITK pull request InsightSoftwareConsortium/ITK#3419 commit InsightSoftwareConsortium/ITK@f222a5e (merged on May 11, 2022)
1 parent e49dee5 commit 851d543

File tree

134 files changed

+157
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+157
-157
lines changed

src/Bridge/VtkGlue/ConvertAnRGBitkImageTovtkImageData/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ main(int argc, char * argv[])
5050
{
5151
filter->Update();
5252
}
53-
catch (itk::ExceptionObject & error)
53+
catch (const itk::ExceptionObject & error)
5454
{
5555
std::cerr << "Error: " << error << std::endl;
5656
return EXIT_FAILURE;

src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ main(int argc, char * argv[])
4848
{
4949
filter->Update();
5050
}
51-
catch (itk::ExceptionObject & error)
51+
catch (const itk::ExceptionObject & error)
5252
{
5353
std::cerr << "Error: " << error << std::endl;
5454
return EXIT_FAILURE;

src/Bridge/VtkGlue/ConvertRGBvtkImageDataToAnitkImage/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ main(int argc, char * argv[])
5454
reader->Update();
5555
filter->Update();
5656
}
57-
catch (itk::ExceptionObject & error)
57+
catch (const itk::ExceptionObject & error)
5858
{
5959
std::cerr << "Error: " << error << std::endl;
6060
return EXIT_FAILURE;

src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ main(int argc, char * argv[])
5656
{
5757
filter->Update();
5858
}
59-
catch (itk::ExceptionObject & error)
59+
catch (const itk::ExceptionObject & error)
6060
{
6161
std::cerr << "Error: " << error << std::endl;
6262
return EXIT_FAILURE;

src/Bridge/VtkGlue/VisualizeStaticDense2DLevelSetAsElevationMap/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ main(int argc, char * argv[])
9393
{
9494
visualizer->Update();
9595
}
96-
catch (itk::ExceptionObject & error)
96+
catch (const itk::ExceptionObject & error)
9797
{
9898
std::cerr << "Error: " << error << std::endl;
9999
return EXIT_FAILURE;

src/Bridge/VtkGlue/VisualizeStaticDense2DLevelSetZeroSet/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ main(int argc, char * argv[])
9393
{
9494
visualizer->Update();
9595
}
96-
catch (itk::ExceptionObject & error)
96+
catch (const itk::ExceptionObject & error)
9797
{
9898
std::cerr << "Error: " << error << std::endl;
9999
return EXIT_FAILURE;

src/Bridge/VtkGlue/VisualizeStaticMalcolm2DLevelSetLayers/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ main(int argc, char * argv[])
8484
{
8585
visualizer->Update();
8686
}
87-
catch (itk::ExceptionObject & error)
87+
catch (const itk::ExceptionObject & error)
8888
{
8989
std::cerr << "Error: " << error << std::endl;
9090
return EXIT_FAILURE;

src/Bridge/VtkGlue/VisualizeStaticShi2DLevelSetLayers/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ main(int argc, char * argv[])
8484
{
8585
visualizer->Update();
8686
}
87-
catch (itk::ExceptionObject & error)
87+
catch (const itk::ExceptionObject & error)
8888
{
8989
std::cerr << "Error: " << error << std::endl;
9090
return EXIT_FAILURE;

src/Bridge/VtkGlue/VisualizeStaticWhitaker2DLevelSetLayers/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ main(int argc, char * argv[])
8585
{
8686
visualizer->Update();
8787
}
88-
catch (itk::ExceptionObject & error)
88+
catch (const itk::ExceptionObject & error)
8989
{
9090
std::cerr << "Error: " << error << std::endl;
9191
return EXIT_FAILURE;

src/Core/Common/ImageRegionOverlap/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ main(int argc, char * argv[])
140140
{
141141
itk::WriteImage(image, out_file_name);
142142
}
143-
catch (itk::ExceptionObject & error)
143+
catch (const itk::ExceptionObject & error)
144144
{
145145
std::cerr << "Error: " << error << std::endl;
146146
return EXIT_FAILURE;

0 commit comments

Comments
 (0)