]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove try-catch blocks in tests. 7402/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 1 Nov 2018 16:21:59 +0000 (10:21 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 1 Nov 2018 16:21:59 +0000 (10:21 -0600)
tests/sparsity/dynamic_sparsity_pattern_iterator_01.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_02.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_03.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_04.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_05.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_06.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_07.cc
tests/sparsity/dynamic_sparsity_pattern_iterator_08.cc
tests/sparsity/sparsity_pattern_iterator_01.cc
tests/sparsity/sparsity_pattern_iterator_07.cc
tests/sparsity/sparsity_pattern_iterator_08.cc

index a301e4059aec35f552e297627fcdc9c0dda0a6a5..f43b0415f7affcf636eb03f24b13d3a3cfbf3c96 100644 (file)
@@ -46,34 +46,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index 5e1f7e519b7d2652843721ddc684053f35d5b711..fc0d721546005831bf1d137a1d499edf2b2556ed 100644 (file)
@@ -49,34 +49,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index d455f2984afe65286917ce2cfcdba2c6044ce6dd..82aeb94cf1ec9842df1d5f4133052c2efa1398f3 100644 (file)
@@ -54,34 +54,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index ee30a64cb66d1d3d6df60ee6fce993d3713c8454..664db7f0b7d5ff78b718a7e51e7eb80181fbe801 100644 (file)
@@ -116,34 +116,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index 79d0a2969e9ef5a8a40675f4f82b792e52f14f4a..ef6ef4b8d30bfe3786297c964504e068f76fa3b4 100644 (file)
@@ -50,37 +50,8 @@ main()
 {
   initlog();
 
-  try
-    {
-      test(false, false);
-      test(true, false);
-      test(false, true);
-      test(true, true);
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test(false, false);
+  test(true, false);
+  test(false, true);
+  test(true, true);
 }
index c28ce802060900dd1bbef7db76365188fd881b21..8ee4e18ee993153b79cd0e804f24521339f062b0 100644 (file)
@@ -49,35 +49,6 @@ main()
 {
   initlog();
 
-  try
-    {
-      test(false);
-      test(true);
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test(false);
+  test(true);
 }
index 94e3af2216cda9264bff7a2d8732830ac009e3be..14bedad286f124778f2480f1ebb90f20dda53784 100644 (file)
@@ -44,34 +44,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index 288d6000e64f24712b6ab0ffd17f6905be05b7bb..64018e8f1e5e9d1619bf886a6cc70edcc4d24fc9 100644 (file)
@@ -44,34 +44,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index f511bacfc080651d478e43865ae9b0e264da8699..b585a3eb0ebe6cc3f0b80e8bb1eda39e638c945c 100644 (file)
@@ -46,34 +46,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index 350812553b23c2073e6adc4262e5ede43cf983e0..269c8f0175aba4c564b0d9392617551fcddb39f8 100644 (file)
@@ -46,34 +46,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }
index 1461a11a67fd383a195adf1ec1e2b299d531bae3..7edb136d13e9a450f4b881451e35d52a9a1dc346 100644 (file)
@@ -44,34 +44,5 @@ main()
 {
   initlog();
 
-  try
-    {
-      test();
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl
-              << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
+  test();
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.