diff --git a/Framework/API/test/AlgorithmFactoryTest.h b/Framework/API/test/AlgorithmFactoryTest.h
index c1e9f80d2a37ac39426e4b7bd293bf59e55fdc4b..a6c91898822e8a6d587497780d6fe26f66335c65 100644
--- a/Framework/API/test/AlgorithmFactoryTest.h
+++ b/Framework/API/test/AlgorithmFactoryTest.h
@@ -126,7 +126,7 @@ public:
     auto &algFactory = AlgorithmFactory::Instance();
 
     TS_ASSERT_THROWS(algFactory.highestVersion("ToyAlgorithm"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     algFactory.subscribe<ToyAlgorithm>();
     TS_ASSERT_EQUALS(1, algFactory.highestVersion("ToyAlgorithm"));
diff --git a/Framework/API/test/AlgorithmManagerTest.h b/Framework/API/test/AlgorithmManagerTest.h
index 3fc570aff9427b5e98cc8be5dea38d9ef63d2f4a..3504b2418812bf1fa7a03eb40dbe1225de1f770c 100644
--- a/Framework/API/test/AlgorithmManagerTest.h
+++ b/Framework/API/test/AlgorithmManagerTest.h
@@ -111,7 +111,7 @@ public:
   void testVersionFail() {
     const size_t nalgs = AlgorithmFactory::Instance().getKeys().size();
     TS_ASSERT_THROWS(AlgorithmFactory::Instance().subscribe<AlgTestFail>(),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // Size should be the same
     TS_ASSERT_EQUALS(AlgorithmFactory::Instance().getKeys().size(), nalgs);
   }
@@ -124,9 +124,9 @@ public:
   void testInstance() {
     TS_ASSERT_THROWS_NOTHING(AlgorithmManager::Instance().create("AlgTest"));
     TS_ASSERT_THROWS(AlgorithmManager::Instance().create("AlgTest", 3),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(AlgorithmManager::Instance().create("aaaaaa"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testClear() {
diff --git a/Framework/API/test/AlgorithmPropertyTest.h b/Framework/API/test/AlgorithmPropertyTest.h
index 1c5f15d65e23201bd0e6ce3a81a376944071ee01..59a023747f8e93b6396d5de714d67eceeb8665c6 100644
--- a/Framework/API/test/AlgorithmPropertyTest.h
+++ b/Framework/API/test/AlgorithmPropertyTest.h
@@ -142,7 +142,7 @@ public:
     IAlgorithm_sptr adder =
         Mantid::API::AlgorithmFactory::Instance().create("SimpleSum", 1);
     TS_ASSERT_THROWS(testAlg.setProperty("CalculateStep", adder),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Add the required property so now it should pass
     adder->initialize();
     TS_ASSERT_THROWS_NOTHING(testAlg.setProperty("CalculateStep", adder));
diff --git a/Framework/API/test/AlgorithmTest.h b/Framework/API/test/AlgorithmTest.h
index 4f1786545ad998723ee0557c6b5719da2b3cf8d2..f59d60b333b3cd10f1f94311d8edf697e514aeb6 100644
--- a/Framework/API/test/AlgorithmTest.h
+++ b/Framework/API/test/AlgorithmTest.h
@@ -293,7 +293,7 @@ public:
 
   void testExecute() {
     ToyAlgorithm myAlg;
-    TS_ASSERT_THROWS(myAlg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(myAlg.execute(), const std::runtime_error &);
     TS_ASSERT(!myAlg.isExecuted());
     TS_ASSERT_THROWS_NOTHING(myAlg.initialize());
     TS_ASSERT_THROWS_NOTHING(myAlg.execute());
@@ -303,7 +303,7 @@ public:
   void testSetPropertyValue() {
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("prop1", "val"))
     TS_ASSERT_THROWS(alg.setPropertyValue("prop3", "1"),
-                     Exception::NotFoundError)
+                     const Exception::NotFoundError &)
   }
 
   void testExistsProperty() {
@@ -315,7 +315,8 @@ public:
     std::string value;
     TS_ASSERT_THROWS_NOTHING(value = alg.getPropertyValue("prop2"))
     TS_ASSERT(!value.compare("1"))
-    TS_ASSERT_THROWS(alg.getPropertyValue("ghjkgh"), Exception::NotFoundError)
+    TS_ASSERT_THROWS(alg.getPropertyValue("ghjkgh"),
+                     const Exception::NotFoundError &)
   }
 
   void testGetProperties() {
@@ -373,7 +374,7 @@ public:
 
   void test_From_String_With_Invalid_Input_Throws() {
     const std::string input = "()";
-    TS_ASSERT_THROWS(Algorithm::fromString(input), std::runtime_error);
+    TS_ASSERT_THROWS(Algorithm::fromString(input), const std::runtime_error &);
   }
 
   void test_Construction_Via_Valid_String_With_No_Properties() {
@@ -988,11 +989,11 @@ public:
 
     TS_ASSERT_THROWS(
         indexAlg.getWorkspaceAndIndices<MatrixWorkspace>("InputWorkspace2"),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         (indexAlg.setWorkspaceInputProperties<MatrixWorkspace, std::string>(
             "InputWorkspace2", "wksp", IndexType::SpectrumNum, "1:5")),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testIndexingAlgorithm_failExistingIndexProperty() {
@@ -1001,7 +1002,7 @@ public:
     TS_ASSERT_THROWS(indexAlg.declareProperty(
                          make_unique<WorkspaceProperty<MatrixWorkspace>>(
                              "InputWorkspace", "", Direction::Input)),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/API/test/AnalysisDataServiceTest.h b/Framework/API/test/AnalysisDataServiceTest.h
index ab64f981d6774f1aad1e70849889df4dddd67ef7..485e3f7520fc50ea4a86671306e7f9152fb8aa5c 100644
--- a/Framework/API/test/AnalysisDataServiceTest.h
+++ b/Framework/API/test/AnalysisDataServiceTest.h
@@ -79,7 +79,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(ads.retrieve("Z"));
 
     ads.remove("Z");
-    TS_ASSERT_THROWS(ads.retrieve("z"), Exception::NotFoundError);
+    TS_ASSERT_THROWS(ads.retrieve("z"), const Exception::NotFoundError &);
   }
 
   void test_retrieveWorkspaces_with_empty_list_returns_empty_list() {
@@ -88,16 +88,17 @@ public:
   }
 
   void test_retrieveWorkspaces_with_all_missing_items_throws_exception() {
-    TS_ASSERT_THROWS(ads.retrieveWorkspaces({"a"}), Exception::NotFoundError);
+    TS_ASSERT_THROWS(ads.retrieveWorkspaces({"a"}),
+                     const Exception::NotFoundError &);
     TS_ASSERT_THROWS(ads.retrieveWorkspaces({"a", "b"}),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void test_retrieveWorkspaces_with_some_missing_items_throws_exception() {
     const std::string name("test_some_missing_items");
     addToADS(name);
     TS_ASSERT_THROWS(ads.retrieveWorkspaces({"a", "b"}),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
     ads.remove(name);
   }
 
@@ -148,7 +149,7 @@ public:
     const std::string name = "SameName";
     TS_ASSERT_THROWS_NOTHING(addToADS(name));
     // Adding again will throw
-    TS_ASSERT_THROWS(addToADS(name), std::runtime_error);
+    TS_ASSERT_THROWS(addToADS(name), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(ads.remove(name));
   }
 
@@ -173,7 +174,7 @@ public:
     TS_ASSERT_EQUALS(ads.doesExist(name), true);
     std::string banned = "Also.Contains.Illegal";
     // This should not be allowed now.
-    TS_ASSERT_THROWS(addToADS(banned), std::invalid_argument);
+    TS_ASSERT_THROWS(addToADS(banned), const std::invalid_argument &);
     // Clear up
     ads.setIllegalCharacterList("");
   }
@@ -182,7 +183,7 @@ public:
   test_AddOrReplace_Does_Not_Throw_When_Adding_Object_That_Has_A_Name_That_Already_Exists() {
     const std::string name("MySpaceAddOrReplace");
     TS_ASSERT_THROWS_NOTHING(addOrReplaceToADS(name));
-    TS_ASSERT_THROWS(addToADS(name), std::runtime_error);
+    TS_ASSERT_THROWS(addToADS(name), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(addOrReplaceToADS(name));
     TS_ASSERT_THROWS_NOTHING(ads.remove(name));
   }
@@ -191,7 +192,7 @@ public:
     const std::string name("MySpace");
     addToADS(name);
     TS_ASSERT_THROWS_NOTHING(ads.remove(name));
-    TS_ASSERT_THROWS(ads.retrieve(name), std::runtime_error);
+    TS_ASSERT_THROWS(ads.retrieve(name), const std::runtime_error &);
     // Remove should not throw but give a warning in the log file, changed by
     // LCC 05/2008
     TS_ASSERT_THROWS_NOTHING(ads.remove("ttttt"));
@@ -328,7 +329,7 @@ public:
     group->addWorkspace(ws2);
     // ADS must have 2 workspaces
     TS_ASSERT_EQUALS(ads.size(), 2);
-    TS_ASSERT_THROWS(ads.add("Group", group), std::runtime_error);
+    TS_ASSERT_THROWS(ads.add("Group", group), const std::runtime_error &);
     // there must be 4 workspaces in the ADS
     TS_ASSERT_EQUALS(ads.size(), 4);
     TS_ASSERT(ads.doesExist("Group"));
@@ -400,9 +401,10 @@ public:
     TS_ASSERT_EQUALS(ads.size(), 4);
 
     // name doesn't exist
-    TS_ASSERT_THROWS(ads.deepRemoveGroup("abc"), std::runtime_error);
+    TS_ASSERT_THROWS(ads.deepRemoveGroup("abc"), const std::runtime_error &);
     // workspace isn't a group
-    TS_ASSERT_THROWS(ads.deepRemoveGroup("group_1"), std::runtime_error);
+    TS_ASSERT_THROWS(ads.deepRemoveGroup("group_1"),
+                     const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(ads.deepRemoveGroup("group"));
     TS_ASSERT_EQUALS(ads.size(), 1);
 
@@ -423,11 +425,11 @@ public:
     TS_ASSERT_EQUALS(group->size(), 1);
 
     TS_ASSERT_THROWS(ads.removeFromGroup("group", "noworkspace"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ads.removeFromGroup("nogroup", "noworkspace"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ads.removeFromGroup("nogroup", "group_1"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     ads.clear();
   }
 
@@ -493,9 +495,10 @@ public:
     auto nullWS = MockWorkspace_sptr();
 
     // Shouldn't be able to add null pointers
-    TS_ASSERT_THROWS(ads.add("null_workspace", nullWS), std::runtime_error);
+    TS_ASSERT_THROWS(ads.add("null_workspace", nullWS),
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ads.addOrReplace("null_workspace", nullWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     TS_ASSERT(!ads.doesExist("null_workspace"));
   }
@@ -519,10 +522,10 @@ private:
                << " is not allowed but ADS did not throw.";
       if (replace) {
         TSM_ASSERT_THROWS(errorMsg.str(), addToADS(name.str()),
-                          std::invalid_argument);
+                          const std::invalid_argument &);
       } else {
         TSM_ASSERT_THROWS(errorMsg.str(), addOrReplaceToADS(name.str()),
-                          std::invalid_argument);
+                          const std::invalid_argument &);
       }
       bool stored = ads.doesExist(name.str());
       TS_ASSERT_EQUALS(stored, false);
diff --git a/Framework/API/test/BinEdgeAxisTest.h b/Framework/API/test/BinEdgeAxisTest.h
index 7ff1cfe815747e2927088020c4e13dba396a22a3..261954ac3059a730b3f85f44339887b121e736f2 100644
--- a/Framework/API/test/BinEdgeAxisTest.h
+++ b/Framework/API/test/BinEdgeAxisTest.h
@@ -77,8 +77,8 @@ public:
       ax1.setValue(i, static_cast<double>(i + 1));
     }
 
-    TS_ASSERT_THROWS(ax1.indexOfValue(0.9), std::out_of_range);  // start
-    TS_ASSERT_THROWS(ax1.indexOfValue(10.1), std::out_of_range); // end
+    TS_ASSERT_THROWS(ax1.indexOfValue(0.9), const std::out_of_range &);  // start
+    TS_ASSERT_THROWS(ax1.indexOfValue(10.1), const std::out_of_range &); // end
   }
 };
 
diff --git a/Framework/API/test/BoxControllerTest.h b/Framework/API/test/BoxControllerTest.h
index 1d4bd01fd3d371680909cb0b05fbce6b4d1af3e6..6f8245e75bb8223785346b4e075a06233b3d5bcc 100644
--- a/Framework/API/test/BoxControllerTest.h
+++ b/Framework/API/test/BoxControllerTest.h
@@ -122,7 +122,7 @@ public:
   void test_setSplitTopIntoThrowsForWrongDimension() {
     BoxController sc(1);
     TSM_ASSERT_THROWS("Should throw for setting a wrong dimension",
-                      sc.setSplitTopInto(1, 10), std::invalid_argument);
+                      sc.setSplitTopInto(1, 10), const std::invalid_argument &);
   }
 
   void doTest_numBoxes(BoxController &bc, size_t expectedNumEntries) {
diff --git a/Framework/API/test/CompositeFunctionTest.h b/Framework/API/test/CompositeFunctionTest.h
index 17febbfef1cd9c325bc3fc0e159bda1e7a427323..e3e41046dfecce2cce59074f5b9f8a66baed44cd 100644
--- a/Framework/API/test/CompositeFunctionTest.h
+++ b/Framework/API/test/CompositeFunctionTest.h
@@ -528,12 +528,12 @@ public:
     mfun->fix(10);
     // g2->fix(1);  // This doesn't work
 
-    TS_ASSERT_THROWS(mfun->setActiveParameter(0, 0), std::runtime_error);
-    TS_ASSERT_THROWS(mfun->setActiveParameter(1, 0), std::runtime_error);
-    TS_ASSERT_THROWS(mfun->setActiveParameter(4, 0), std::runtime_error);
-    TS_ASSERT_THROWS(mfun->setActiveParameter(6, 0), std::runtime_error);
-    TS_ASSERT_THROWS(mfun->setActiveParameter(7, 0), std::runtime_error);
-    TS_ASSERT_THROWS(mfun->setActiveParameter(10, 0), std::runtime_error);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(0, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(1, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(4, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(6, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(7, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(mfun->setActiveParameter(10, 0), const std::runtime_error &);
 
     mfun->setActiveParameter(2, 100);
     mfun->setActiveParameter(3, 101);
diff --git a/Framework/API/test/DetectorInfoTest.h b/Framework/API/test/DetectorInfoTest.h
index 986817e8664d8a041ca58a8fc85ccff24802e155..3ad8b9ea17854900e5572a5a9cfcdeb7f93486a0 100644
--- a/Framework/API/test/DetectorInfoTest.h
+++ b/Framework/API/test/DetectorInfoTest.h
@@ -72,7 +72,7 @@ public:
 
   void test_l1_no_instrument() {
     TS_ASSERT_THROWS(m_workspaceNoInstrument.detectorInfo().l1(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_l1_no_instrument_call_once_regression() {
@@ -82,9 +82,9 @@ public:
     // call to `l1` can be repeated. If the bug is reintroduced this test will
     // not fail but FREEZE.
     TS_ASSERT_THROWS(m_workspaceNoInstrument.detectorInfo().l1(),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(m_workspaceNoInstrument.detectorInfo().l1(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_isMonitor() {
@@ -141,8 +141,8 @@ public:
     TS_ASSERT_DELTA(detectorInfo.twoTheta(1), 0.0, 1e-6);
     TS_ASSERT_DELTA(detectorInfo.twoTheta(2), 0.0199973, 1e-6);
     // Monitors
-    TS_ASSERT_THROWS(detectorInfo.twoTheta(3), std::logic_error);
-    TS_ASSERT_THROWS(detectorInfo.twoTheta(4), std::logic_error);
+    TS_ASSERT_THROWS(detectorInfo.twoTheta(3), const std::logic_error &);
+    TS_ASSERT_THROWS(detectorInfo.twoTheta(4), const std::logic_error &);
   }
 
   // Legacy test via the workspace method detectorTwoTheta(), which might be
@@ -160,8 +160,8 @@ public:
     TS_ASSERT_DELTA(detectorInfo.signedTwoTheta(1), 0.0, 1e-6);
     TS_ASSERT_DELTA(detectorInfo.signedTwoTheta(2), 0.0199973, 1e-6);
     // Monitors
-    TS_ASSERT_THROWS(detectorInfo.signedTwoTheta(3), std::logic_error);
-    TS_ASSERT_THROWS(detectorInfo.signedTwoTheta(4), std::logic_error);
+    TS_ASSERT_THROWS(detectorInfo.signedTwoTheta(3), const std::logic_error &);
+    TS_ASSERT_THROWS(detectorInfo.signedTwoTheta(4), const std::logic_error &);
   }
 
   void test_position() {
@@ -432,7 +432,7 @@ public:
     auto ws1 = makeWorkspace(1);
     auto ws2 = makeWorkspace(2);
     TS_ASSERT_THROWS(ws2->mutableDetectorInfo() = ws1->detectorInfo(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/API/test/ExperimentInfoTest.h b/Framework/API/test/ExperimentInfoTest.h
index 850df22c71da3a312864b6b7a357e1c05eae5c54..91464c748ebc3470441ff586787f19f8e4f9d04a 100644
--- a/Framework/API/test/ExperimentInfoTest.h
+++ b/Framework/API/test/ExperimentInfoTest.h
@@ -113,13 +113,14 @@ public:
   void test_Setting_A_New_Source_With_NULL_Ptr_Throws() {
     ExperimentInfo ws;
 
-    TS_ASSERT_THROWS(ws.setModeratorModel(nullptr), std::invalid_argument);
+    TS_ASSERT_THROWS(ws.setModeratorModel(nullptr),
+                     const std::invalid_argument &);
   }
 
   void test_Retrieving_Source_Properties_Before_Set_Throws() {
     ExperimentInfo ws;
 
-    TS_ASSERT_THROWS(ws.moderatorModel(), std::runtime_error);
+    TS_ASSERT_THROWS(ws.moderatorModel(), const std::runtime_error &);
   }
 
   void test_Setting_New_Source_Description_With_Valid_Object_Does_Not_Throw() {
@@ -137,7 +138,8 @@ public:
   void test_Setting_A_New_Chopper_With_NULL_Ptr_Throws() {
     ExperimentInfo_sptr ws = createTestInfoWithChopperPoints(1);
 
-    TS_ASSERT_THROWS(ws->setChopperModel(nullptr), std::invalid_argument);
+    TS_ASSERT_THROWS(ws->setChopperModel(nullptr),
+                     const std::invalid_argument &);
   }
 
   void test_Setting_A_New_Chopper_To_Point_Lower_Point_Succeeds() {
@@ -151,13 +153,13 @@ public:
     ExperimentInfo_sptr ws = createTestInfoWithChopperPoints(1);
 
     TS_ASSERT_THROWS_NOTHING(ws->setChopperModel(new FakeChopper));
-    TS_ASSERT_THROWS(ws->chopperModel(1), std::invalid_argument);
+    TS_ASSERT_THROWS(ws->chopperModel(1), const std::invalid_argument &);
   }
 
   void test_Getting_Chopper_At_Index_Greater_Than_Descriptions_Added_Throws() {
     ExperimentInfo_sptr ws = createTestInfoWithChopperPoints(1);
 
-    TS_ASSERT_THROWS(ws->chopperModel(2), std::invalid_argument);
+    TS_ASSERT_THROWS(ws->chopperModel(2), const std::invalid_argument &);
   }
 
   void test_GetSetSample() {
@@ -175,7 +177,7 @@ public:
   void test_GetLog_Throws_If_No_Log_Or_Instrument_Parameter_Exists() {
     ExperimentInfo expt;
 
-    TS_ASSERT_THROWS(expt.getLog("__NOTALOG__"), std::invalid_argument);
+    TS_ASSERT_THROWS(expt.getLog("__NOTALOG__"), const std::invalid_argument &);
   }
 
   void
@@ -186,7 +188,7 @@ public:
     addInstrumentWithParameter(expt, instPar, actualLogName);
 
     TS_ASSERT_THROWS(expt.getLog(instPar),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void
@@ -222,7 +224,7 @@ public:
     ExperimentInfo expt;
 
     TS_ASSERT_THROWS(expt.getLogAsSingleValue("__NOTALOG__"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -233,7 +235,7 @@ public:
     addInstrumentWithParameter(expt, instPar, actualLogName);
 
     TS_ASSERT_THROWS(expt.getLogAsSingleValue(instPar),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void
@@ -373,7 +375,7 @@ public:
     ExperimentInfo_sptr exptInfo = createTestInfoWithDirectEModeLog();
 
     TS_ASSERT_THROWS(exptInfo->getEFixed(1),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_correct_efixed_value_is_returned_for_direct_run() {
@@ -388,7 +390,7 @@ public:
     ExperimentInfo_sptr exptInfo(new ExperimentInfo);
     Instrument_sptr inst = addInstrumentWithIndirectEmodeParameter(exptInfo);
 
-    TS_ASSERT_THROWS(exptInfo->getEFixed(), std::runtime_error);
+    TS_ASSERT_THROWS(exptInfo->getEFixed(), const std::runtime_error &);
   }
 
   void
@@ -397,7 +399,7 @@ public:
     addInstrumentWithIndirectEmodeParameter(exptInfo);
     IDetector_const_sptr det = exptInfo->getInstrument()->getDetector(3);
 
-    TS_ASSERT_THROWS(exptInfo->getEFixed(det), std::runtime_error);
+    TS_ASSERT_THROWS(exptInfo->getEFixed(det), const std::runtime_error &);
   }
 
   void
@@ -466,7 +468,7 @@ public:
   void test_Getting_Group_For_Unknown_ID_Throws() {
     ExperimentInfo expt;
 
-    TS_ASSERT_THROWS(expt.groupOfDetectorID(1), std::out_of_range);
+    TS_ASSERT_THROWS(expt.groupOfDetectorID(1), const std::out_of_range &);
   }
 
   void
diff --git a/Framework/API/test/ExpressionTest.h b/Framework/API/test/ExpressionTest.h
index 76bc723be3bd9ade36b5f782068b290bcdafa53d..802ffd48bce2415ac4a6670d773d78d663740a09 100644
--- a/Framework/API/test/ExpressionTest.h
+++ b/Framework/API/test/ExpressionTest.h
@@ -50,8 +50,8 @@ public:
 
   void testMismatchedBrackets() {
     Expression expr;
-    TS_ASSERT_THROWS(expr.parse("b*(c+a"), std::runtime_error);
-    TS_ASSERT_THROWS(expr.parse("b*c+a)"), std::runtime_error);
+    TS_ASSERT_THROWS(expr.parse("b*(c+a"), const std::runtime_error &);
+    TS_ASSERT_THROWS(expr.parse("b*c+a)"), const std::runtime_error &);
   }
 
   void testFunctions() {
@@ -247,10 +247,10 @@ public:
     TS_ASSERT_EQUALS(e12[1].name(), "%%");
 
     Expression e13(bin_ops1, un_ops1);
-    TS_ASSERT_THROWS(e13.parse("x==%%"), std::runtime_error);
+    TS_ASSERT_THROWS(e13.parse("x==%%"), const std::runtime_error &);
 
     Expression e14(bin_ops1, un_ops1);
-    TS_ASSERT_THROWS(e14.parse("x==%% "), std::runtime_error);
+    TS_ASSERT_THROWS(e14.parse("x==%% "), const std::runtime_error &);
 
     std::vector<std::string> bin_ops2{"-", "--"};
     std::unordered_set<std::string> un_ops2{"-", "--"};
@@ -324,7 +324,7 @@ public:
     TS_ASSERT_EQUALS(expression[0][0][0].name(), "1");
 
     Expression e1;
-    TS_ASSERT_THROWS(e1.parse("---1"), std::runtime_error);
+    TS_ASSERT_THROWS(e1.parse("---1"), const std::runtime_error &);
   }
 
   void testRemoveBrackets() {
@@ -402,15 +402,15 @@ public:
   void testEndOnOperator() {
     {
       Expression expression;
-      TS_ASSERT_THROWS(expression.parse("x+y+z +  "), std::runtime_error);
+      TS_ASSERT_THROWS(expression.parse("x+y+z +  "), const std::runtime_error &);
     }
     {
       Expression expression;
-      TS_ASSERT_THROWS(expression.parse("x*z-"), std::runtime_error);
+      TS_ASSERT_THROWS(expression.parse("x*z-"), const std::runtime_error &);
     }
     {
       Expression expression;
-      TS_ASSERT_THROWS(expression.parse("x*z="), std::runtime_error);
+      TS_ASSERT_THROWS(expression.parse("x*z="), const std::runtime_error &);
     }
     {
       Expression expression;
diff --git a/Framework/API/test/FermiChopperModelTest.h b/Framework/API/test/FermiChopperModelTest.h
index 8c8c41502eb32f1e9277fc51257b42a309214191..7e286708244bf5f6c28e011ada086ed27fc2c638 100644
--- a/Framework/API/test/FermiChopperModelTest.h
+++ b/Framework/API/test/FermiChopperModelTest.h
@@ -22,7 +22,7 @@ public:
   void test_Default_Object_Throws_When_Computing_Pulse_Variance() {
     using namespace Mantid::API;
     FermiChopperModel chopper;
-    TS_ASSERT_THROWS(chopper.pulseTimeVariance(), std::invalid_argument);
+    TS_ASSERT_THROWS(chopper.pulseTimeVariance(), const std::invalid_argument &);
   }
 
   void test_Getters_Produce_Expected_Values_When_Set_By_Settings() {
@@ -67,7 +67,7 @@ public:
     chopper->setAngularVelocityInHz(350);
     chopper->setChopperRadius(155.0 / 1000.);
 
-    TS_ASSERT_THROWS(chopper->pulseTimeVariance(), std::invalid_argument);
+    TS_ASSERT_THROWS(chopper->pulseTimeVariance(), const std::invalid_argument &);
   }
 
   void
@@ -76,9 +76,9 @@ public:
     FermiChopperModel_sptr chopper = createTestChopperBySetters();
 
     TS_ASSERT_THROWS(chopper->sampleTimeDistribution(-0.01),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(chopper->sampleTimeDistribution(1.01),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/API/test/FileBackedExperimentInfoTest.h b/Framework/API/test/FileBackedExperimentInfoTest.h
index 469f2a71397829b4ae62859f47ed9c4b467aaad0..28f6643ae614281aad2f33aaeb81d04131fcc756 100644
--- a/Framework/API/test/FileBackedExperimentInfoTest.h
+++ b/Framework/API/test/FileBackedExperimentInfoTest.h
@@ -167,7 +167,7 @@ public:
   void test_getEFixed() {
     auto fileBacked = createTestObject();
 
-    TS_ASSERT_THROWS(fileBacked->getEFixed(10100), std::runtime_error);
+    TS_ASSERT_THROWS(fileBacked->getEFixed(10100), const std::runtime_error &);
   }
 
   void test_setEFixed() {
@@ -183,7 +183,7 @@ public:
     // Create the file backed experiment info, shouldn't be loaded yet
     FileBackedExperimentInfo fileBacked(m_filename, "/not/right/path");
 
-    TS_ASSERT_THROWS(fileBacked.toString(), std::runtime_error);
+    TS_ASSERT_THROWS(fileBacked.toString(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/API/test/FileFinderTest.h b/Framework/API/test/FileFinderTest.h
index 04df991f430b5779cac73734ceaf0fe00c05fd7c..b94cf7e80ef682911997f59353c9e416af8702a2 100644
--- a/Framework/API/test/FileFinderTest.h
+++ b/Framework/API/test/FileFinderTest.h
@@ -175,10 +175,10 @@ public:
 
     TS_ASSERT_THROWS(
         fName = FileFinder::Instance().makeFileName("ABCD", instrument),
-        std::invalid_argument);
+        const std::invalid_argument &);
     TS_ASSERT_THROWS(
         fName = FileFinder::Instance().makeFileName("123456", instrument),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     fName = FileFinder::Instance().makeFileName("0", instrument);
     TS_ASSERT_EQUALS(fName, "HRP00000");
@@ -310,19 +310,19 @@ public:
     std::vector<std::string> files;
     TS_ASSERT_THROWS(files =
                          FileFinder::Instance().findRuns("MUSR15189-n15193"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(files =
                          FileFinder::Instance().findRuns("MUSR15189n-15193"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(files =
                          FileFinder::Instance().findRuns("MUSR15189-15193n"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(files =
                          FileFinder::Instance().findRuns("MUSR15189-151n93"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(files =
                          FileFinder::Instance().findRuns("MUSR15n189-151n93"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
     TS_ASSERT_THROWS_NOTHING(
         files = FileFinder::Instance().findRuns("MUSR15189-15193"));
     TS_ASSERT_EQUALS(files.size(), 5);
@@ -622,7 +622,7 @@ public:
     std::string accidentalEndOfRange = "99999";
     range << startOfRange << "-" << accidentalEndOfRange;
     TS_ASSERT_THROWS(files = fileFinder.findRuns(range.str().c_str()),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
 
     fileFinder.setCaseSensitive(startingCaseOption);
   }
diff --git a/Framework/API/test/FrameworkManagerTest.h b/Framework/API/test/FrameworkManagerTest.h
index 2ed4b3cca01d151c9be6d8d822d9b4678285c0ba..a76b34f7dc761b75dca684c40ae33a3fb0577e5b 100644
--- a/Framework/API/test/FrameworkManagerTest.h
+++ b/Framework/API/test/FrameworkManagerTest.h
@@ -71,9 +71,9 @@ public:
         FrameworkManager::Instance().createAlgorithm("ToyAlgorithm2"))
     TS_ASSERT_THROWS(
         FrameworkManager::Instance().createAlgorithm("ToyAlgorithm2", "", 3),
-        std::runtime_error)
+        const std::runtime_error &)
     TS_ASSERT_THROWS(FrameworkManager::Instance().createAlgorithm("aaaaaa"),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 
   void testcreateAlgorithmWithProps() {
@@ -97,7 +97,7 @@ public:
 
   void testGetWorkspace() {
     TS_ASSERT_THROWS(FrameworkManager::Instance().getWorkspace("wrongname"),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 };
 
diff --git a/Framework/API/test/FunctionAttributeTest.h b/Framework/API/test/FunctionAttributeTest.h
index 40f9358d6ccc9f71fb14adf4ab54a8f48fe71452..5b47668af33ba1b6b4750d99ae785c6a2554b9c2 100644
--- a/Framework/API/test/FunctionAttributeTest.h
+++ b/Framework/API/test/FunctionAttributeTest.h
@@ -54,7 +54,7 @@ public:
     att.setDouble(1.1);
     TS_ASSERT_EQUALS(att.asDouble(), 1.1);
 
-    TS_ASSERT_THROWS(att.setInt(100), std::runtime_error);
+    TS_ASSERT_THROWS(att.setInt(100), const std::runtime_error &);
 
     att.fromString("0.5");
     TS_ASSERT_EQUALS(att.asDouble(), 0.5);
diff --git a/Framework/API/test/FunctionDomainGeneralTest.h b/Framework/API/test/FunctionDomainGeneralTest.h
index 340ce141754484f11d8bfdd9474709dddbb0d99d..f3178a80e9a4b426393980e03d44bc202af8e708 100644
--- a/Framework/API/test/FunctionDomainGeneralTest.h
+++ b/Framework/API/test/FunctionDomainGeneralTest.h
@@ -88,7 +88,7 @@ public:
     TS_ASSERT_EQUALS(domain.size(), 5);
     TS_ASSERT_EQUALS(domain.columnCount(), 3);
     Column_sptr column4(new TestColumn<int>(2));
-    TS_ASSERT_THROWS(domain.addColumn(column4), std::runtime_error);
+    TS_ASSERT_THROWS(domain.addColumn(column4), const std::runtime_error &);
   }
 
   void test_column_values() {
diff --git a/Framework/API/test/FunctionParameterDecoratorTest.h b/Framework/API/test/FunctionParameterDecoratorTest.h
index 0a5aee63ca08db850355f32aace400a5f1ae00a5..4c831f6f1b51cba3a06791e249aa725b9b3be8de 100644
--- a/Framework/API/test/FunctionParameterDecoratorTest.h
+++ b/Framework/API/test/FunctionParameterDecoratorTest.h
@@ -23,8 +23,8 @@
 using namespace Mantid::API;
 using namespace Mantid::Kernel;
 
-using ::testing::Mock;
 using ::testing::_;
+using ::testing::Mock;
 
 class FunctionParameterDecoratorTest;
 
@@ -137,13 +137,13 @@ public:
   void testSetDecoratedFunctionInvalidName() {
     TestableFunctionParameterDecorator fn;
     TS_ASSERT_THROWS(fn.setDecoratedFunction("INVALIDFUNCTION"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
     TS_ASSERT(!fn.getDecoratedFunction());
   }
 
   void testThrowIfNoFunctionSet() {
     TestableFunctionParameterDecorator fn;
-    TS_ASSERT_THROWS(fn.throwIfNoFunctionSet(), std::runtime_error);
+    TS_ASSERT_THROWS(fn.throwIfNoFunctionSet(), const std::runtime_error &);
     fn.setDecoratedFunction("FunctionWithParameters");
     TS_ASSERT_THROWS_NOTHING(fn.throwIfNoFunctionSet());
   }
@@ -172,10 +172,13 @@ public:
 
   void testGetSetParameter() {
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.setParameter(0, 2.0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.getParameter(0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.setParameter("Height", 2.0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.getParameter("Height"), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.setParameter(0, 2.0),
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.getParameter(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.setParameter("Height", 2.0),
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.getParameter("Height"),
+                     const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -185,18 +188,19 @@ public:
     IFunction_sptr decoratedFunction = fn->getDecoratedFunction();
     TS_ASSERT_EQUALS(fn->getParameter(0), decoratedFunction->getParameter(0));
     TS_ASSERT_EQUALS(fn->getParameter(0), 2.0);
-    TS_ASSERT_THROWS(fn->getParameter(10), std::out_of_range);
+    TS_ASSERT_THROWS(fn->getParameter(10), const std::out_of_range &);
 
     TS_ASSERT_THROWS_NOTHING(fn->setParameter("Height", 4.0));
     TS_ASSERT_EQUALS(fn->getParameter("Height"),
                      decoratedFunction->getParameter("Height"));
     TS_ASSERT_EQUALS(fn->getParameter("Height"), 4.0);
-    TS_ASSERT_THROWS(fn->getParameter("DoesNotExist"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn->getParameter("DoesNotExist"),
+                     const std::invalid_argument &);
   }
 
   void testExplicitelySet() {
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.isExplicitlySet(0), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.isExplicitlySet(0), const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -213,8 +217,8 @@ public:
 
   void testGetSetError() {
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.getError(0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.setError(0, 2.0), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.getError(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.setError(0, 2.0), const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -229,9 +233,9 @@ public:
 
   void testFixUnfixIsFixed() {
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.isFixed(0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.fix(0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.unfix(0), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.isFixed(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.fix(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.unfix(0), const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -287,11 +291,11 @@ public:
 
   void testTies() {
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.tie("Name", "a=b"), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.applyTies(), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.clearTies(), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.removeTie(0), std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.getTie(0), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.tie("Name", "a=b"), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.applyTies(), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.clearTies(), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.removeTie(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.getTie(0), const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -367,8 +371,9 @@ public:
   void testSetParameterDescription() {
     TestableFunctionParameterDecorator invalidFn;
     TS_ASSERT_THROWS(invalidFn.setParameterDescription(0, "None"),
-                     std::runtime_error);
-    TS_ASSERT_THROWS(invalidFn.parameterDescription(0), std::runtime_error);
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(invalidFn.parameterDescription(0),
+                     const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
@@ -379,12 +384,12 @@ public:
     TS_ASSERT_EQUALS(fn->parameterDescription(0),
                      decoratedFunction->parameterDescription(0));
     TS_ASSERT_EQUALS(fn->parameterDescription(0), "None");
-    TS_ASSERT_THROWS(fn->parameterDescription(10), std::out_of_range);
+    TS_ASSERT_THROWS(fn->parameterDescription(10), const std::out_of_range &);
 
     TS_ASSERT_THROWS_NOTHING(
         fn->setParameterDescription("Height", "Something"));
     TS_ASSERT_THROWS(fn->setParameterDescription("DoesNotExist", "Something"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testBeforeDecoratedFunctionSetIsCalled() {
@@ -423,7 +428,7 @@ public:
     Workspace_const_sptr ws = boost::make_shared<const WorkspaceGroup>();
 
     TestableFunctionParameterDecorator invalidFn;
-    TS_ASSERT_THROWS(invalidFn.setWorkspace(ws), std::runtime_error);
+    TS_ASSERT_THROWS(invalidFn.setWorkspace(ws), const std::runtime_error &);
 
     FunctionParameterDecorator_sptr fn =
         getFunctionParameterDecoratorGaussian();
diff --git a/Framework/API/test/FunctionTest.h b/Framework/API/test/FunctionTest.h
index 9cedd97efeaa916bb318a8db440ca6648d4720c0..fdb172aeb83ed77df24f9c0279c7924c8e69ac52 100644
--- a/Framework/API/test/FunctionTest.h
+++ b/Framework/API/test/FunctionTest.h
@@ -188,10 +188,10 @@ public:
     TS_ASSERT(!f.isFixed(2));
     TS_ASSERT(f.isFixed(3));
 
-    TS_ASSERT_THROWS(f.activeParameter(1), std::runtime_error);
-    TS_ASSERT_THROWS(f.activeParameter(3), std::runtime_error);
-    TS_ASSERT_THROWS(f.setActiveParameter(1, 0), std::runtime_error);
-    TS_ASSERT_THROWS(f.setActiveParameter(3, 0), std::runtime_error);
+    TS_ASSERT_THROWS(f.activeParameter(1), const std::runtime_error &);
+    TS_ASSERT_THROWS(f.activeParameter(3), const std::runtime_error &);
+    TS_ASSERT_THROWS(f.setActiveParameter(1, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(f.setActiveParameter(3, 0), const std::runtime_error &);
   }
 
   void testUnfix() {
diff --git a/Framework/API/test/FunctionValuesTest.h b/Framework/API/test/FunctionValuesTest.h
index ba55f11917c5764c0317f074a49118828017b5b7..efb8f8ec64edb5cbbfdd814ce61394b8e59a83e5 100644
--- a/Framework/API/test/FunctionValuesTest.h
+++ b/Framework/API/test/FunctionValuesTest.h
@@ -64,24 +64,24 @@ public:
     FunctionDomain1DVector domain3(x3);
     FunctionValues values3(domain3);
 
-    TS_ASSERT_THROWS(values3 += values1, std::runtime_error);
+    TS_ASSERT_THROWS(values3 += values1, const std::runtime_error &);
   }
 
   void testFitData() {
     FunctionDomain1DVector domain(x);
     FunctionValues values1(domain);
 
-    TS_ASSERT_THROWS(values1.getFitData(0), std::runtime_error);
-    TS_ASSERT_THROWS(values1.getFitWeight(0), std::runtime_error);
+    TS_ASSERT_THROWS(values1.getFitData(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(values1.getFitWeight(0), const std::runtime_error &);
 
     values1.setFitData(5, 10.1);
     for (size_t i = 0; i < values1.size(); ++i) {
       TS_ASSERT_EQUALS(values1.getFitData(i), i == 5 ? 10.1 : 0.0);
-      TS_ASSERT_THROWS(values1.getFitWeight(i), std::runtime_error);
+      TS_ASSERT_THROWS(values1.getFitWeight(i), const std::runtime_error &);
     }
 
     std::vector<double> y(9);
-    TS_ASSERT_THROWS(values1.setFitData(y), std::invalid_argument);
+    TS_ASSERT_THROWS(values1.setFitData(y), const std::invalid_argument &);
 
     y.resize(10);
     for (size_t i = 0; i < y.size(); ++i) {
@@ -101,11 +101,11 @@ public:
     values1.setFitWeight(5, 10.1);
     for (size_t i = 0; i < values1.size(); ++i) {
       TS_ASSERT_EQUALS(values1.getFitWeight(i), i == 5 ? 10.1 : 0.0);
-      TS_ASSERT_THROWS(values1.getFitData(i), std::runtime_error);
+      TS_ASSERT_THROWS(values1.getFitData(i), const std::runtime_error &);
     }
 
     std::vector<double> y(9);
-    TS_ASSERT_THROWS(values1.setFitWeights(y), std::invalid_argument);
+    TS_ASSERT_THROWS(values1.setFitWeights(y), const std::invalid_argument &);
 
     y.resize(10);
     for (size_t i = 0; i < y.size(); ++i) {
diff --git a/Framework/API/test/IFunction1DSpectrumTest.h b/Framework/API/test/IFunction1DSpectrumTest.h
index 8bbf8c45003b8adadb21f540bbfbe76724e715ae..1b534adeb73e9bab44f38bc3b36b8dc982c5fdb2 100644
--- a/Framework/API/test/IFunction1DSpectrumTest.h
+++ b/Framework/API/test/IFunction1DSpectrumTest.h
@@ -59,7 +59,7 @@ public:
 
     IFunction_sptr fun(new ConcreteFunction1DSpectrum);
 
-    TS_ASSERT_THROWS(fun->function(domain, values), std::invalid_argument);
+    TS_ASSERT_THROWS(fun->function(domain, values), const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/API/test/ILatticeFunctionTest.h b/Framework/API/test/ILatticeFunctionTest.h
index fbc282aaf04a0f0a6a103d56f331b83acc4c4ef5..eac5855a691dcc68bf53e1b954fd7ee98faf29a4 100644
--- a/Framework/API/test/ILatticeFunctionTest.h
+++ b/Framework/API/test/ILatticeFunctionTest.h
@@ -70,11 +70,11 @@ public:
     EXPECT_CALL(wrongDomain, size()).WillRepeatedly(Return(1));
     FunctionValues values(wrongDomain);
 
-    TS_ASSERT_THROWS(fn.function(wrongDomain, values), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.function(wrongDomain, values), const std::invalid_argument &);
 
     MockJacobian jacobian;
     TS_ASSERT_THROWS(fn.functionDeriv(wrongDomain, jacobian),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/API/test/IMDWorkspaceTest.h b/Framework/API/test/IMDWorkspaceTest.h
index d684f1714f6eb2a023d0643e0f00ffbe70d1f911..de32c35f3cc6417fc92fc61078fdd51cd1096393 100644
--- a/Framework/API/test/IMDWorkspaceTest.h
+++ b/Framework/API/test/IMDWorkspaceTest.h
@@ -88,7 +88,8 @@ public:
     WorkspaceTester matrixWS;
     matrixWS.initialize(1, 1, 1);
     TSM_ASSERT_THROWS("Id doesn't exist. Should throw during find routine.",
-                      matrixWS.getDimensionWithId("3"), std::overflow_error);
+                      matrixWS.getDimensionWithId("3"),
+                      const std::overflow_error &);
   }
 
   void testGetDimension() {
@@ -106,7 +107,7 @@ public:
     matrixWS.initialize(1, 1, 1);
     TSM_ASSERT_THROWS(
         "The dimension does not exist. Attempting to get it should throw",
-        matrixWS.getDimensionWithId("1"), std::overflow_error);
+        matrixWS.getDimensionWithId("1"), const std::overflow_error &);
   }
 
   void testGetNPoints() {
diff --git a/Framework/API/test/IkedaCarpenterModeratorTest.h b/Framework/API/test/IkedaCarpenterModeratorTest.h
index a61ffb3e5ad35976ce64c00d3bdbe4322040da53..e74ba160bfe3f47df26a7ccd589a792db75698f4 100644
--- a/Framework/API/test/IkedaCarpenterModeratorTest.h
+++ b/Framework/API/test/IkedaCarpenterModeratorTest.h
@@ -36,19 +36,19 @@ public:
   void test_Initializing_With_Empty_String_Throws() {
     Mantid::API::IkedaCarpenterModerator ikmod;
 
-    TS_ASSERT_THROWS(ikmod.initialize(""), std::invalid_argument);
+    TS_ASSERT_THROWS(ikmod.initialize(""), const std::invalid_argument &);
   }
 
   void test_Initializing_With_Invalid_String_Throws() {
     Mantid::API::IkedaCarpenterModerator ikmod;
 
-    TS_ASSERT_THROWS(ikmod.initialize("TiltAngle"), std::invalid_argument);
+    TS_ASSERT_THROWS(ikmod.initialize("TiltAngle"), const std::invalid_argument &);
   }
 
   void test_Initializing_With_String_Containing_Unknown_Parameter_Throws() {
     Mantid::API::IkedaCarpenterModerator ikmod;
 
-    TS_ASSERT_THROWS(ikmod.initialize("unknown=6.3"), std::invalid_argument);
+    TS_ASSERT_THROWS(ikmod.initialize("unknown=6.3"), const std::invalid_argument &);
   }
 
   void
@@ -88,9 +88,9 @@ public:
     IkedaCarpenterModerator_sptr ikmod = createTestModerator();
 
     TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(-0.01),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(-1.5),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -122,8 +122,8 @@ public:
     IkedaCarpenterModerator_sptr ikmod = createTestModerator();
 
     TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(1.01),
-                     std::invalid_argument);
-    TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(5.5), std::invalid_argument);
+                     const std::invalid_argument &);
+    TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(5.5), const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/API/test/ImmutableCompositeFunctionTest.h b/Framework/API/test/ImmutableCompositeFunctionTest.h
index 98f3a83d486781112eaf2bab1a7c59abb1363483..336aaa437dc0c5663188d18f0eb176373328f7ea 100644
--- a/Framework/API/test/ImmutableCompositeFunctionTest.h
+++ b/Framework/API/test/ImmutableCompositeFunctionTest.h
@@ -249,12 +249,12 @@ public:
 
   void testParameterAliasUnique() {
     TS_ASSERT_THROWS(ImmutableCompositeFunctionTest_FunctionThrow icf,
-                     Mantid::Kernel::Exception::ExistsError);
+                     const Mantid::Kernel::Exception::ExistsError &);
   }
 
   void testSetAliasThrowsIfNameDoesntExist() {
     TS_ASSERT_THROWS(ImmutableCompositeFunctionTest_FunctionThrow1 icf,
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testAddTies() {
diff --git a/Framework/API/test/ImplicitFunctionFactoryTest.h b/Framework/API/test/ImplicitFunctionFactoryTest.h
index a83ebe21e68b5ad87f0c3d32a1bbb3475f515e6a..f94b5c4a70e468ed6a25b62b6688c3961f2ba9da 100644
--- a/Framework/API/test/ImplicitFunctionFactoryTest.h
+++ b/Framework/API/test/ImplicitFunctionFactoryTest.h
@@ -189,7 +189,7 @@ public:
         "Should have thrown exeption on use of create rather than "
         "createunwrapped.",
         Mantid::API::ImplicitFunctionFactory::Instance().create(""),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
index 6a3238ee3bb9e575b6c35cab9d684cb8e5c3e83e..ba81f84ee363a03a9592f9116ad96638401bb27d 100644
--- a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
+++ b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h
@@ -98,7 +98,7 @@ public:
         "createunwrapped.",
         Mantid::API::ImplicitFunctionParameterParserFactory::Instance().create(
             ""),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/Framework/API/test/ImplicitFunctionParserFactoryTest.h b/Framework/API/test/ImplicitFunctionParserFactoryTest.h
index 4d2e04d375f884e8bc65a0711ac8f72a916d094a..e1db7e32ba756d1b3a5a849728f46f8f338ee4d6 100644
--- a/Framework/API/test/ImplicitFunctionParserFactoryTest.h
+++ b/Framework/API/test/ImplicitFunctionParserFactoryTest.h
@@ -100,7 +100,7 @@ public:
         "Should have thrown exception on use of create rather than "
         "createunwrapped.",
         Mantid::API::ImplicitFunctionParserFactory::Instance().create(""),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/Framework/API/test/IndexTypePropertyTest.h b/Framework/API/test/IndexTypePropertyTest.h
index 4bd587a8d7ebaa917ac3f0fb06282d5710ee8e86..78ce5d79332a6fb51dee58318c2c36634ed3872f 100644
--- a/Framework/API/test/IndexTypePropertyTest.h
+++ b/Framework/API/test/IndexTypePropertyTest.h
@@ -29,7 +29,7 @@ public:
   }
 
   void testContructorFailsWithInvalidIndexType() {
-    TS_ASSERT_THROWS(IndexTypeProperty("IndexType", 0), std::invalid_argument);
+    TS_ASSERT_THROWS(IndexTypeProperty("IndexType", 0), const std::invalid_argument &);
   }
 
   void testSingleIndexTypeAutomaticallySet() {
diff --git a/Framework/API/test/InstrumentDataServiceTest.h b/Framework/API/test/InstrumentDataServiceTest.h
index a4b79bfe9b98bf9492f9e66096088a4cb09f08cb..8ea7156d885ac436308e7df4165b6ab11d43076a 100644
--- a/Framework/API/test/InstrumentDataServiceTest.h
+++ b/Framework/API/test/InstrumentDataServiceTest.h
@@ -32,7 +32,7 @@ public:
   void testAdd() {
     // Adding an Instrument with empty name should throw
     TS_ASSERT_THROWS(InstrumentDataService::Instance().add("", inst1),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // This should not throw, valid name
     TS_ASSERT_THROWS_NOTHING(
         InstrumentDataService::Instance().add("inst1", inst1));
@@ -42,7 +42,7 @@ public:
   void testAddOrReplace() {
     // AddorReplace an Instrument with empty name should throw
     TS_ASSERT_THROWS(InstrumentDataService::Instance().addOrReplace("", inst2),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(
         InstrumentDataService::Instance().addOrReplace("inst2", inst2));
     TS_ASSERT_EQUALS(inst2.use_count(), 2);
@@ -73,7 +73,7 @@ public:
     // Should throw if the instrument can not be retrieved
     TS_ASSERT_THROWS(
         InstrumentDataService::Instance().retrieve("notregistered"),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void testRemove() {
diff --git a/Framework/API/test/LatticeDomainTest.h b/Framework/API/test/LatticeDomainTest.h
index eade0e1e48c0b9cf814b970139e84b55c4c85d1b..b1ed9e0d0d496f68e4eb9234988e912a66196adc 100644
--- a/Framework/API/test/LatticeDomainTest.h
+++ b/Framework/API/test/LatticeDomainTest.h
@@ -13,8 +13,8 @@
 #include "MantidKernel/Exception.h"
 
 using Mantid::API::LatticeDomain;
-using Mantid::Kernel::Exception::IndexError;
 using Mantid::Kernel::V3D;
+using Mantid::Kernel::Exception::IndexError;
 
 using namespace Mantid::API;
 
@@ -51,7 +51,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(domain[1]);
     TS_ASSERT_THROWS_NOTHING(domain[2]);
 
-    TS_ASSERT_THROWS(domain[3], IndexError)
+    TS_ASSERT_THROWS(domain[3], const IndexError &)
   }
 };
 
diff --git a/Framework/API/test/LiveListenerFactoryTest.h b/Framework/API/test/LiveListenerFactoryTest.h
index 70d2d204209182299aa6d437a4f4894faf402c79..31535cf950f1c2a838190f73c35c3d5e2ce77524 100644
--- a/Framework/API/test/LiveListenerFactoryTest.h
+++ b/Framework/API/test/LiveListenerFactoryTest.h
@@ -103,7 +103,7 @@ public:
 
     // Check that unregistered class request throws
     TS_ASSERT_THROWS(factory.create("fdsfds", false),
-                     Mantid::Kernel::Exception::NotFoundError)
+                     const Mantid::Kernel::Exception::NotFoundError &)
     TS_ASSERT(testing::Mock::VerifyAndClearExpectations(product.get()));
     factory.unsubscribe("MockLiveListener");
   }
@@ -139,7 +139,8 @@ public:
     EXPECT_CALL(*product, connect(testing::_))
         .WillOnce(testing::Return(false /*cannot connect*/));
     Kernel::ConfigService::Instance().setFacility("TEST");
-    TS_ASSERT_THROWS(factory.create("MINITOPAZ", true), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create("MINITOPAZ", true),
+                     const std::runtime_error &);
     TS_ASSERT(testing::Mock::VerifyAndClearExpectations(product.get()));
     // Now test that it doesn't throw if we ask not to connect
     EXPECT_CALL(*product, connect(testing::_)).Times(0);
@@ -164,7 +165,7 @@ public:
     Mantid::Kernel::DynamicFactory<ILiveListener> &f =
         LiveListenerFactory::Instance();
     TS_ASSERT_THROWS(f.createUnwrapped(""),
-                     Mantid::Kernel::Exception::NotImplementedError)
+                     const Mantid::Kernel::Exception::NotImplementedError &)
     factory.unsubscribe("MockLiveListener");
   }
 };
diff --git a/Framework/API/test/LogFilterGeneratorTest.h b/Framework/API/test/LogFilterGeneratorTest.h
index 685cc2f5213aa52e4a0acc862cb5d42c2a99b72b..12fd7bb1c4de21b9816f376f5c7f0930e0affb8e 100644
--- a/Framework/API/test/LogFilterGeneratorTest.h
+++ b/Framework/API/test/LogFilterGeneratorTest.h
@@ -37,13 +37,13 @@ public:
     auto ws = createTestWorkspace();
     LogFilterGenerator generator(LogFilterGenerator::FilterType::Status, ws);
     TS_ASSERT_THROWS(generator.generateFilter("NonExistentLog"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_logExistsButIsNotNumericTimeSeries_throws() {
     auto ws = createTestWorkspace();
     LogFilterGenerator generator(LogFilterGenerator::FilterType::Status, ws);
-    TS_ASSERT_THROWS(generator.generateFilter("BadLog"), std::invalid_argument);
+    TS_ASSERT_THROWS(generator.generateFilter("BadLog"), const std::invalid_argument &);
   }
 
   void test_typeIsNone_noFilterReturned() {
diff --git a/Framework/API/test/LogManagerTest.h b/Framework/API/test/LogManagerTest.h
index 6d4060d396601b31a1138f24d50060b96c15fa36..7664d64281968d2167a78ffc1dc0741b6b4c19f3 100644
--- a/Framework/API/test/LogManagerTest.h
+++ b/Framework/API/test/LogManagerTest.h
@@ -85,7 +85,7 @@ public:
     TS_ASSERT(!pp->name().compare("Test"));
     TS_ASSERT(dynamic_cast<ConcreteProperty *>(pp));
     TS_ASSERT_THROWS(pp = runInfo.getProperty("NotThere"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
 
     std::vector<Property *> props = runInfo.getProperties();
     TS_ASSERT(!props.empty());
@@ -106,7 +106,7 @@ public:
   void testStartTime() {
     LogManager runInfo;
     // Nothing there yet
-    TS_ASSERT_THROWS(runInfo.startTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.startTime(), const std::runtime_error &);
     // Add run_start and see that get picked up
     const std::string run_start("2013-12-19T13:38:00");
     auto run_start_prop =
@@ -125,7 +125,7 @@ public:
     TS_ASSERT_EQUALS(runInfo.startTime(), DateAndTime(run_start));
     // And back to failure if they're both that
     run_start_prop->setValue(epoch);
-    TS_ASSERT_THROWS(runInfo.startTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.startTime(), const std::runtime_error &);
 
     // Set run_start back to valid value and make start_time contain nonsense
     run_start_prop->setValue(run_start);
@@ -137,17 +137,17 @@ public:
     TS_ASSERT_EQUALS(runInfo.startTime(), DateAndTime(run_start));
     // Now make run_start something invalid
     run_start_prop->setValue("notADate");
-    TS_ASSERT_THROWS(runInfo.startTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.startTime(), const std::runtime_error &);
     // And check things if it's the wrong property type
     runInfo.removeProperty("run_start");
     addTimeSeriesEntry(runInfo, "run_start", 4.44);
-    TS_ASSERT_THROWS(runInfo.startTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.startTime(), const std::runtime_error &);
   }
 
   void testEndTime() {
     LogManager runInfo;
     // Nothing there yet
-    TS_ASSERT_THROWS(runInfo.endTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.endTime(), const std::runtime_error &);
     // Add run_end and see that get picked up
     const std::string run_end("2013-12-19T13:38:00");
     auto run_end_prop = new PropertyWithValue<std::string>("run_end", run_end);
@@ -170,11 +170,11 @@ public:
     TS_ASSERT_EQUALS(runInfo.endTime(), DateAndTime(run_end));
     // Now make run_end something invalid
     run_end_prop->setValue("notADate");
-    TS_ASSERT_THROWS(runInfo.endTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.endTime(), const std::runtime_error &);
     // And check things if it's the wrong property type
     runInfo.removeProperty("run_end");
     addTimeSeriesEntry(runInfo, "run_end", 4.44);
-    TS_ASSERT_THROWS(runInfo.endTime(), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.endTime(), const std::runtime_error &);
   }
 
   void testMemory() {
@@ -202,7 +202,7 @@ public:
   void test_GetTimeSeriesProperty_Throws_When_Log_Does_Not_Exist() {
     LogManager runInfo;
     TS_ASSERT_THROWS(runInfo.getTimeSeriesProperty<double>("not_a_log"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void
@@ -212,13 +212,13 @@ public:
     runInfo.addProperty(name, 5.6); // Standard double property
 
     TS_ASSERT_THROWS(runInfo.getTimeSeriesProperty<double>(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_GetPropertyAsType_Throws_When_Property_Does_Not_Exist() {
     LogManager runInfo;
     TS_ASSERT_THROWS(runInfo.getPropertyValueAsType<double>("not_a_log"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void test_GetPropertyAsType_Returns_Expected_Value_When_Type_Is_Correct() {
@@ -238,7 +238,7 @@ public:
     runInfo.addProperty("double_prop", 6.7); // Standard double property
 
     TS_ASSERT_THROWS(runInfo.getPropertyValueAsType<int>("double_prop"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_GetPropertyAsSingleValue_SingleValue_DoubleType() {
@@ -295,13 +295,13 @@ public:
     const std::string name = "T_prop";
     runInfo.addProperty<double>(name, 1.0);
     TS_ASSERT_THROWS(runInfo.getPropertyAsIntegerValue(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_GetPropertyAsSingleInteger_Throws_for_nonexistant_property() {
     LogManager runInfo;
     TS_ASSERT_THROWS(runInfo.getPropertyAsIntegerValue("T_prop"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void test_GetPropertyAsSingleValue_TimeSeries_DoubleType() {
@@ -334,7 +334,7 @@ public:
     runInfo.addProperty<std::string>(name, "hello"); // not a number
 
     TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -345,7 +345,7 @@ public:
     runInfo.addProperty<bool>(name, value); // Adds a bool property
 
     TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h
index 103df1ce698fe8d870aa921217c26c6aacb02cbb..0a3d5f4358ba830f524f7cc558ab1dbbb6ac4378 100644
--- a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h
+++ b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h
@@ -139,7 +139,7 @@ public:
 
     // quick checks to make sure things are returning the expected values
     TS_ASSERT(!(ws->isCommonBins()));
-    TS_ASSERT_THROWS(ws->blocksize(), std::logic_error);
+    TS_ASSERT_THROWS(ws->blocksize(), const std::logic_error &);
     TS_ASSERT_EQUALS(ws->size(), 17);
     // Split in 4 iterators
     auto iterators = ws->createIterators(4, nullptr);
diff --git a/Framework/API/test/MatrixWorkspaceTest.h b/Framework/API/test/MatrixWorkspaceTest.h
index 8f78d300b15b850276e0720615805c1d0d61b7da..ae1928b3fa2b09762a460ee488347ae4f007159e 100644
--- a/Framework/API/test/MatrixWorkspaceTest.h
+++ b/Framework/API/test/MatrixWorkspaceTest.h
@@ -545,16 +545,16 @@ public:
   void testAxes() { TS_ASSERT_EQUALS(ws->axes(), 2); }
 
   void testGetAxis() {
-    TS_ASSERT_THROWS(ws->getAxis(-1), Exception::IndexError);
+    TS_ASSERT_THROWS(ws->getAxis(-1), const Exception::IndexError &);
     TS_ASSERT_THROWS_NOTHING(ws->getAxis(0));
     TS_ASSERT(ws->getAxis(0));
     TS_ASSERT(ws->getAxis(0)->isNumeric());
-    TS_ASSERT_THROWS(ws->getAxis(2), Exception::IndexError);
+    TS_ASSERT_THROWS(ws->getAxis(2), const Exception::IndexError &);
   }
 
   void testReplaceAxis() {
     Axis *ax = new SpectraAxis(ws.get());
-    TS_ASSERT_THROWS(ws->replaceAxis(2, ax), Exception::IndexError);
+    TS_ASSERT_THROWS(ws->replaceAxis(2, ax), const Exception::IndexError &);
     TS_ASSERT_THROWS_NOTHING(ws->replaceAxis(0, ax));
     TS_ASSERT(ws->getAxis(0)->isSpectra());
   }
@@ -734,15 +734,18 @@ public:
     TS_ASSERT(!ws2->hasMaskedBins(-1));
 
     // Will throw if nothing masked for spectrum
-    TS_ASSERT_THROWS(ws2->maskedBins(0), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS(ws2->maskedBins(0),
+                     const Mantid::Kernel::Exception::IndexError &);
     // Will throw if attempting to mask invalid spectrum
     TS_ASSERT_THROWS(ws2->maskBin(-1, 1),
-                     Mantid::Kernel::Exception::IndexError);
-    TS_ASSERT_THROWS(ws2->maskBin(1, 1), Mantid::Kernel::Exception::IndexError);
+                     const Mantid::Kernel::Exception::IndexError &);
+    TS_ASSERT_THROWS(ws2->maskBin(1, 1),
+                     const Mantid::Kernel::Exception::IndexError &);
     // ...or an invalid bin
     TS_ASSERT_THROWS(ws2->maskBin(0, -1),
-                     Mantid::Kernel::Exception::IndexError);
-    TS_ASSERT_THROWS(ws2->maskBin(0, 2), Mantid::Kernel::Exception::IndexError);
+                     const Mantid::Kernel::Exception::IndexError &);
+    TS_ASSERT_THROWS(ws2->maskBin(0, 2),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     // Now do a valid masking
     TS_ASSERT_THROWS_NOTHING(ws2->maskBin(0, 1, 0.5));
@@ -825,7 +828,8 @@ public:
 
     // Check it throws for non-spectra axis
     ws.replaceAxis(1, new NumericAxis(1));
-    TS_ASSERT_THROWS(ws.getSpectrumToWorkspaceIndexMap(), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getSpectrumToWorkspaceIndexMap(),
+                     const std::runtime_error &);
   }
 
   void test_getDetectorIDToWorkspaceIndexMap() {
@@ -841,7 +845,7 @@ public:
 
     ws->getSpectrum(2).addDetectorID(99); // Set a second ID on one spectrum
     TS_ASSERT_THROWS(ws->getDetectorIDToWorkspaceIndexMap(true),
-                     std::runtime_error);
+                     const std::runtime_error &);
     detid2index_map idmap2 = ws->getDetectorIDToWorkspaceIndexMap();
     TS_ASSERT_EQUALS(idmap2.size(), 6);
   }
@@ -988,13 +992,13 @@ public:
   void test_setMDMasking() {
     WorkspaceTester ws;
     TSM_ASSERT_THROWS("Characterisation test. This is not implemented.",
-                      ws.setMDMasking(nullptr), std::runtime_error);
+                      ws.setMDMasking(nullptr), const std::runtime_error &);
   }
 
   void test_clearMDMasking() {
     WorkspaceTester ws;
     TSM_ASSERT_THROWS("Characterisation test. This is not implemented.",
-                      ws.clearMDMasking(), std::runtime_error);
+                      ws.clearMDMasking(), const std::runtime_error &);
   }
 
   void test_getSpecialCoordinateSystem_default() {
@@ -1039,11 +1043,11 @@ public:
   void
   test_getFirstPulseTime_getLastPulseTime_throws_if_protoncharge_missing_or_empty() {
     WorkspaceTester ws;
-    TS_ASSERT_THROWS(ws.getFirstPulseTime(), std::runtime_error);
-    TS_ASSERT_THROWS(ws.getLastPulseTime(), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getFirstPulseTime(), const std::runtime_error &);
+    TS_ASSERT_THROWS(ws.getLastPulseTime(), const std::runtime_error &);
     ws.mutableRun().addLogData(new TimeSeriesProperty<double>("proton_charge"));
-    TS_ASSERT_THROWS(ws.getFirstPulseTime(), std::runtime_error);
-    TS_ASSERT_THROWS(ws.getLastPulseTime(), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getFirstPulseTime(), const std::runtime_error &);
+    TS_ASSERT_THROWS(ws.getLastPulseTime(), const std::runtime_error &);
   }
 
   void
@@ -1053,13 +1057,13 @@ public:
     proton_charge->addValue("2013-04-21T10:19:10", 1);
     proton_charge->addValue("2013-04-21T10:19:12", 2);
     ws.mutableRun().addLogData(proton_charge);
-    TS_ASSERT_THROWS(ws.getFirstPulseTime(), std::invalid_argument);
-    TS_ASSERT_THROWS(ws.getLastPulseTime(), std::invalid_argument);
+    TS_ASSERT_THROWS(ws.getFirstPulseTime(), const std::invalid_argument &);
+    TS_ASSERT_THROWS(ws.getLastPulseTime(), const std::invalid_argument &);
 
     ws.mutableRun().addProperty(
         new PropertyWithValue<double>("proton_charge", 99.0), true);
-    TS_ASSERT_THROWS(ws.getFirstPulseTime(), std::invalid_argument);
-    TS_ASSERT_THROWS(ws.getLastPulseTime(), std::invalid_argument);
+    TS_ASSERT_THROWS(ws.getFirstPulseTime(), const std::invalid_argument &);
+    TS_ASSERT_THROWS(ws.getLastPulseTime(), const std::invalid_argument &);
   }
 
   void test_getXMinMax() {
@@ -1209,7 +1213,8 @@ public:
     const size_t start = 0;
     const size_t stop = 8;
     size_t width = 0;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     width = 3;
     TS_ASSERT_THROWS_NOTHING(ws.getImageY(start, stop, width));
   }
@@ -1223,9 +1228,11 @@ public:
     size_t start = 10;
     size_t stop = 8;
     size_t width = 3;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     start = 9;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     start = 0;
     TS_ASSERT_THROWS_NOTHING(ws.getImageY(start, stop, width));
   }
@@ -1239,9 +1246,11 @@ public:
     size_t start = 0;
     size_t stop = 18;
     size_t width = 3;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     stop = 9;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     stop = 8;
     TS_ASSERT_THROWS_NOTHING(ws.getImageY(start, stop, width));
   }
@@ -1255,7 +1264,8 @@ public:
     size_t start = 1;
     size_t stop = 0;
     size_t width = 1;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
     stop = 1;
     TS_ASSERT_THROWS_NOTHING(ws.getImageY(start, stop, width));
   }
@@ -1269,7 +1279,8 @@ public:
     size_t start = 0;
     size_t stop = 7;
     size_t width = 3;
-    TS_ASSERT_THROWS(ws.getImageY(start, stop, width), std::runtime_error);
+    TS_ASSERT_THROWS(ws.getImageY(start, stop, width),
+                     const std::runtime_error &);
   }
 
   void test_getImage_wrong_indexStart() {
@@ -1284,14 +1295,14 @@ public:
     double startX = 3;
     double endX = 4;
     TS_ASSERT_THROWS(ws.getImageY(start, stop, width, startX, endX),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     WorkspaceTester wsh;
     wsh.initialize(9, 1, 1);
     startX = 2;
     endX = 2;
     TS_ASSERT_THROWS(wsh.getImageY(start, stop, width, startX, endX),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_getImage_wrong_indexEnd() {
@@ -1306,7 +1317,7 @@ public:
     double startX = 1.0;
     double endX = 0.0;
     TS_ASSERT_THROWS(ws.getImageY(start, stop, width, startX, endX),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     WorkspaceTester wsh;
     wsh.initialize(9, 2, 2);
@@ -1316,7 +1327,7 @@ public:
     startX = 1.0;
     endX = 0.0;
     TS_ASSERT_THROWS(wsh.getImageY(start, stop, width, startX, endX),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_getImage_single_bin_histo() {
@@ -1463,14 +1474,14 @@ public:
     auto image = createImage(2, 3);
     WorkspaceTester ws;
     ws.initialize(2, 2, 1);
-    TS_ASSERT_THROWS(ws.setImageY(*image), std::runtime_error);
+    TS_ASSERT_THROWS(ws.setImageY(*image), const std::runtime_error &);
   }
 
   void test_setImage_not_single_bin() {
     auto image = createImage(2, 3);
     WorkspaceTester ws;
     ws.initialize(20, 3, 2);
-    TS_ASSERT_THROWS(ws.setImageY(*image), std::runtime_error);
+    TS_ASSERT_THROWS(ws.setImageY(*image), const std::runtime_error &);
   }
 
   void test_setImageY() {
@@ -1644,15 +1655,15 @@ public:
     TS_ASSERT_THROWS_NOTHING(specInfo.detector(0));
     const auto &det = specInfo.detector(0);
     // Failing legacy methods (use DetectorInfo/SpectrumInfo instead):
-    TS_ASSERT_THROWS(det.getPos(), std::runtime_error);
-    TS_ASSERT_THROWS(det.getRelativePos(), std::runtime_error);
-    TS_ASSERT_THROWS(det.getRotation(), std::runtime_error);
-    TS_ASSERT_THROWS(det.getRelativeRot(), std::runtime_error);
-    TS_ASSERT_THROWS(det.getPhi(), std::runtime_error);
+    TS_ASSERT_THROWS(det.getPos(), const std::runtime_error &);
+    TS_ASSERT_THROWS(det.getRelativePos(), const std::runtime_error &);
+    TS_ASSERT_THROWS(det.getRotation(), const std::runtime_error &);
+    TS_ASSERT_THROWS(det.getRelativeRot(), const std::runtime_error &);
+    TS_ASSERT_THROWS(det.getPhi(), const std::runtime_error &);
     // Failing methods, currently without replacement:
-    TS_ASSERT_THROWS(det.solidAngle(V3D(0, 0, 0)), std::runtime_error);
+    TS_ASSERT_THROWS(det.solidAngle(V3D(0, 0, 0)), const std::runtime_error &);
     BoundingBox bb;
-    TS_ASSERT_THROWS(det.getBoundingBox(bb), std::runtime_error);
+    TS_ASSERT_THROWS(det.getBoundingBox(bb), const std::runtime_error &);
     // Moving parent not possible since non-detector components do not have time
     // indices and thus DetectorInfo cannot tell which set of detector positions
     // to adjust.
@@ -1663,12 +1674,12 @@ public:
     TS_ASSERT_THROWS(compInfo.setPosition(compInfo.parent(compInfo.indexOf(
                                               det.getComponentID())),
                                           V3D(1, 2, 3)),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // Try to rotate the parent
     TS_ASSERT_THROWS(compInfo.setRotation(compInfo.parent(compInfo.indexOf(
                                               det.getComponentID())),
                                           Quat(1, 2, 3, 4)),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_legacy_setting_spectrum_numbers_with_MPI() {
@@ -1735,8 +1746,8 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 3, xValues);
 
     TS_ASSERT_EQUALS(workspace.getNumberHistograms(), 1);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, 1), std::out_of_range);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, -1), std::out_of_range);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, 1), const std::out_of_range &);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, -1), const std::out_of_range &);
   }
 
   void
@@ -1744,8 +1755,8 @@ public:
     std::vector<double> const xValues{1.0, 2.0, 3.0, 4.0};
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 3, xValues);
 
-    TS_ASSERT_THROWS(workspace.yIndexOfX(5.), std::out_of_range);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(0.), std::out_of_range);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(5.), const std::out_of_range &);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(0.), const std::out_of_range &);
   }
 
   void
@@ -1810,8 +1821,8 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 3, xValues);
 
     TS_ASSERT_EQUALS(workspace.getNumberHistograms(), 1);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, 1), std::out_of_range);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, -1), std::out_of_range);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, 1), const std::out_of_range &);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(2.5, -1), const std::out_of_range &);
   }
 
   void
@@ -1820,11 +1831,11 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 3, xValues);
 
     TS_ASSERT_THROWS(workspace.yIndexOfX(std::nextafter(5.3, 10.0)),
-                     std::out_of_range);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(5.4), std::out_of_range);
+                     const std::out_of_range &);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(5.4), const std::out_of_range &);
     TS_ASSERT_THROWS(workspace.yIndexOfX(std::nextafter(2.3, 0.0)),
-                     std::out_of_range);
-    TS_ASSERT_THROWS(workspace.yIndexOfX(0.), std::out_of_range);
+                     const std::out_of_range &);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(0.), const std::out_of_range &);
   }
 
   void
@@ -1889,7 +1900,7 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
     TS_ASSERT_THROWS(workspace.yIndexOfX(2.0, 0, 0.0002),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -1898,7 +1909,7 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
     TS_ASSERT_THROWS(workspace.yIndexOfX(1.9992, 0, 0.0002),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -1906,7 +1917,7 @@ public:
     std::vector<double> const xValues{1.0, 1.9997, 3.0, 4.0};
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
-    TS_ASSERT_THROWS(workspace.yIndexOfX(3.5), std::invalid_argument);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(3.5), const std::invalid_argument &);
   }
 
   void
@@ -1939,7 +1950,7 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
     TS_ASSERT_THROWS(workspace.yIndexOfX(1.9994, 0, 0.0002),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -1948,7 +1959,7 @@ public:
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
     TS_ASSERT_THROWS(workspace.yIndexOfX(2.0, 0, 0.0002),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -1956,7 +1967,7 @@ public:
     std::vector<double> const xValues{4.0, 3.0, 1.9997, 1.0};
     auto const workspace = getWorkspaceWithPopulatedX(1, 4, 4, xValues);
 
-    TS_ASSERT_THROWS(workspace.yIndexOfX(3.5), std::invalid_argument);
+    TS_ASSERT_THROWS(workspace.yIndexOfX(3.5), const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/API/test/MultiDomainFunctionTest.h b/Framework/API/test/MultiDomainFunctionTest.h
index 62f5ef1d7fc3a66af5f677784113a30230029635..7e076be2a880acd337a8cf54b2a20ae661d67643 100644
--- a/Framework/API/test/MultiDomainFunctionTest.h
+++ b/Framework/API/test/MultiDomainFunctionTest.h
@@ -233,10 +233,10 @@ public:
     FunctionValues values(domain);
 
     multi.setDomainIndex(0, 3);
-    TS_ASSERT_THROWS(multi.function(domain, values), std::invalid_argument);
+    TS_ASSERT_THROWS(multi.function(domain, values), const std::invalid_argument &);
 
     multi.setDomainIndex(0, 4);
-    TS_ASSERT_THROWS(multi.function(domain, values), std::invalid_argument);
+    TS_ASSERT_THROWS(multi.function(domain, values), const std::invalid_argument &);
   }
 
   void test_calc() {
diff --git a/Framework/API/test/MultiPeriodGroupAlgorithmTest.h b/Framework/API/test/MultiPeriodGroupAlgorithmTest.h
index 0cd963993c11ff195bd59d0c84344fe14f4c285a..5803429c2806287868b3c606fc87dcb91c056150 100644
--- a/Framework/API/test/MultiPeriodGroupAlgorithmTest.h
+++ b/Framework/API/test/MultiPeriodGroupAlgorithmTest.h
@@ -160,7 +160,7 @@ public:
     alg.setPropertyValue("OutputWorkspace", "outWS");
     TSM_ASSERT_THROWS("Should throw because fetchInputPropertyName is "
                       "returning the name of a property which doesn't exist.",
-                      alg.execute(), std::runtime_error);
+                      alg.execute(), const std::runtime_error &);
   }
 
   void test_input_property_doesnt_exist_throws() {
@@ -200,7 +200,7 @@ public:
     alg.setPropertyValue("OutputWorkspace", "outWS");
     TSM_ASSERT_THROWS("Should throw because fetchInputPropertyName is "
                       "returning the name of a property which doesn't exist.",
-                      alg.execute(), Kernel::Exception::NotFoundError);
+                      alg.execute(), const Kernel::Exception::NotFoundError &);
   }
 
   void test_process_groups_with_array_input() {
diff --git a/Framework/API/test/NumericAxisTest.h b/Framework/API/test/NumericAxisTest.h
index 56d38407c045331f360ad4bab42739160efa9ee5..2fc2a4c9268da38a5edb76a20ff6c34d80740dd5 100644
--- a/Framework/API/test/NumericAxisTest.h
+++ b/Framework/API/test/NumericAxisTest.h
@@ -59,7 +59,7 @@ public:
     TS_ASSERT_EQUALS(copiedAxis.unit()->unitID(), "Wavelength");
     TS_ASSERT(copiedAxis.isNumeric());
     TS_ASSERT_EQUALS(copiedAxis(0), 5.5);
-    TS_ASSERT_THROWS(copiedAxis(1), Exception::IndexError);
+    TS_ASSERT_THROWS(copiedAxis(1), const Exception::IndexError &);
   }
 
   void testClone() {
@@ -99,13 +99,15 @@ public:
   void testIsText() { TS_ASSERT(!numericAxis->isText()); }
 
   void testOperatorBrackets() {
-    TS_ASSERT_THROWS((*numericAxis)(-1), Exception::IndexError);
-    TS_ASSERT_THROWS((*numericAxis)(5), Exception::IndexError);
+    TS_ASSERT_THROWS((*numericAxis)(-1), const Exception::IndexError &);
+    TS_ASSERT_THROWS((*numericAxis)(5), const Exception::IndexError &);
   }
 
   void testSetValue() {
-    TS_ASSERT_THROWS(numericAxis->setValue(-1, 1.1), Exception::IndexError);
-    TS_ASSERT_THROWS(numericAxis->setValue(5, 1.1), Exception::IndexError);
+    TS_ASSERT_THROWS(numericAxis->setValue(-1, 1.1),
+                     const Exception::IndexError &);
+    TS_ASSERT_THROWS(numericAxis->setValue(5, 1.1),
+                     const Exception::IndexError &);
 
     for (int i = 0; i < 5; ++i) {
       TS_ASSERT_THROWS_NOTHING(numericAxis->setValue(i, i + 0.5));
@@ -114,8 +116,8 @@ public:
   }
 
   void testSpectraNo() {
-    TS_ASSERT_THROWS(numericAxis->spectraNo(-1), std::domain_error);
-    TS_ASSERT_THROWS(numericAxis->spectraNo(5), std::domain_error);
+    TS_ASSERT_THROWS(numericAxis->spectraNo(-1), const std::domain_error &);
+    TS_ASSERT_THROWS(numericAxis->spectraNo(5), const std::domain_error &);
   }
 
   void testConversionToBins() {
@@ -215,8 +217,8 @@ public:
       axis.setValue(i, static_cast<double>(i));
     }
 
-    TS_ASSERT_THROWS(axis.indexOfValue(-0.6), std::out_of_range);
-    TS_ASSERT_THROWS(axis.indexOfValue(4.6), std::out_of_range);
+    TS_ASSERT_THROWS(axis.indexOfValue(-0.6), const std::out_of_range &);
+    TS_ASSERT_THROWS(axis.indexOfValue(4.6), const std::out_of_range &);
   }
 
 private:
diff --git a/Framework/API/test/ParamFunctionAttributeHolderTest.h b/Framework/API/test/ParamFunctionAttributeHolderTest.h
index 3531977d7a8e4cf5688d40b8ff8c7de19b0a3d8d..d347d77bda1a512fd2b1bd64c140ece38b8dc17b 100644
--- a/Framework/API/test/ParamFunctionAttributeHolderTest.h
+++ b/Framework/API/test/ParamFunctionAttributeHolderTest.h
@@ -51,9 +51,9 @@ public:
     using namespace Mantid::API;
     FakeParamFunctionAttributeHolder funct;
 
-    TS_ASSERT_THROWS(funct.getAttribute("NonExistent"), std::invalid_argument);
+    TS_ASSERT_THROWS(funct.getAttribute("NonExistent"), const std::invalid_argument &);
     TS_ASSERT_THROWS(funct.setAttribute("NonExistent", IFunction::Attribute(1)),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_hasAttribute_Returns_True_For_Existing_Attribute() {
diff --git a/Framework/API/test/ParameterTieTest.h b/Framework/API/test/ParameterTieTest.h
index d7cd0318b6f1194a592cb5dfd6617ddc71e328c0..6ddfe2e1399e5941b33d72b6d597339e87c0cc96 100644
--- a/Framework/API/test/ParameterTieTest.h
+++ b/Framework/API/test/ParameterTieTest.h
@@ -127,11 +127,11 @@ public:
     TS_ASSERT_EQUALS(tie.getLocalFunction(), g1.get());
     TS_ASSERT_EQUALS(tie.getLocalIndex(), 2);
 
-    TS_ASSERT_THROWS(mustThrow1(&mfun), std::invalid_argument);
-    TS_ASSERT_THROWS(mustThrow2(&mfun), std::invalid_argument);
-    TS_ASSERT_THROWS(mustThrow3(&mfun), std::out_of_range);
+    TS_ASSERT_THROWS(mustThrow1(&mfun), const std::invalid_argument &);
+    TS_ASSERT_THROWS(mustThrow2(&mfun), const std::invalid_argument &);
+    TS_ASSERT_THROWS(mustThrow3(&mfun), const std::out_of_range &);
 
-    TS_ASSERT_THROWS(tie.set("a+b"), std::invalid_argument);
+    TS_ASSERT_THROWS(tie.set("a+b"), const std::invalid_argument &);
   }
 
   void testComposite1() {
@@ -185,25 +185,25 @@ public:
     TS_ASSERT_EQUALS(tie1.asString(mf2.get()), "f0.sig=sin(f0.sig)+f1.cen/2");
 
     ParameterTie tie2(&mfun, "f1.f0.sig", "123.4");
-    TS_ASSERT_THROWS(tie2.asString(mf1.get()), std::logic_error);
+    TS_ASSERT_THROWS(tie2.asString(mf1.get()), const std::logic_error &);
     TS_ASSERT_EQUALS(tie2.asString(&mfun), "f1.f0.sig=123.4");
     TS_ASSERT_EQUALS(tie2.asString(mf2.get()), "f0.sig=123.4");
     TS_ASSERT_EQUALS(tie2.asString(g1.get()), "sig=123.4");
 
     ParameterTie tie3(g1.get(), "sig", "123.4");
-    TS_ASSERT_THROWS(tie3.asString(mf1.get()), std::logic_error);
+    TS_ASSERT_THROWS(tie3.asString(mf1.get()), const std::logic_error &);
     TS_ASSERT_EQUALS(tie3.asString(&mfun), "f1.f0.sig=123.4");
     TS_ASSERT_EQUALS(tie3.asString(mf2.get()), "f0.sig=123.4");
     TS_ASSERT_EQUALS(tie3.asString(g1.get()), "sig=123.4");
 
     ParameterTie tie4(mf2.get(), "f0.sig", "123.4");
-    TS_ASSERT_THROWS(tie4.asString(mf1.get()), std::logic_error);
+    TS_ASSERT_THROWS(tie4.asString(mf1.get()), const std::logic_error &);
     TS_ASSERT_EQUALS(tie4.asString(&mfun), "f1.f0.sig=123.4");
     TS_ASSERT_EQUALS(tie4.asString(mf2.get()), "f0.sig=123.4");
     TS_ASSERT_EQUALS(tie4.asString(g1.get()), "sig=123.4");
 
     ParameterTie tie5(nth.get(), "a", "cos(B1e2Ta_)-sin(alpha12)");
-    TS_ASSERT_THROWS(tie5.asString(mf1.get()), std::logic_error);
+    TS_ASSERT_THROWS(tie5.asString(mf1.get()), const std::logic_error &);
     TS_ASSERT_EQUALS(tie5.asString(&mfun),
                      "f1.f2.a=cos(f1.f2.B1e2Ta_)-sin(f1.f2.alpha12)");
     TS_ASSERT_EQUALS(tie5.asString(mf2.get()),
@@ -221,11 +221,11 @@ public:
 
     TS_ASSERT_EQUALS(tie.getLocalIndex(), 1);
     TS_ASSERT_DELTA(tie.eval(), 0.6, 0.00001);
-    TS_ASSERT_THROWS(mustThrow4(&bk), std::invalid_argument);
-    TS_ASSERT_THROWS(mustThrow5(&bk), std::invalid_argument);
-    TS_ASSERT_THROWS(tie.set("q+p"), std::invalid_argument);
+    TS_ASSERT_THROWS(mustThrow4(&bk), const std::invalid_argument &);
+    TS_ASSERT_THROWS(mustThrow5(&bk), const std::invalid_argument &);
+    TS_ASSERT_THROWS(tie.set("q+p"), const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(tie.set(""), std::runtime_error);
+    TS_ASSERT_THROWS(tie.set(""), const std::runtime_error &);
   }
 
   void test_untie_fixed() {
diff --git a/Framework/API/test/ProgressTest.h b/Framework/API/test/ProgressTest.h
index 5878a82418a855a23a14470c363019bc41294828..32b95dec616598de24e3d57d57875ee9964847f6 100644
--- a/Framework/API/test/ProgressTest.h
+++ b/Framework/API/test/ProgressTest.h
@@ -20,8 +20,8 @@ public:
   static void destroySuite(ProgressTest *suite) { delete suite; }
 
   void testBadParameters() {
-    TS_ASSERT_THROWS(Progress(nullptr, -1., 100., 42), std::invalid_argument);
-    TS_ASSERT_THROWS(Progress(nullptr, 1., .1, 42), std::invalid_argument);
+    TS_ASSERT_THROWS(Progress(nullptr, -1., 100., 42), const std::invalid_argument &);
+    TS_ASSERT_THROWS(Progress(nullptr, 1., .1, 42), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/API/test/RemoteJobManagerFactoryTest.h b/Framework/API/test/RemoteJobManagerFactoryTest.h
index e764f506dc23fd2ba6e6fa7ba95c95bba8e16939..a8a339d050b7590ca0d4a012355beabfbd2845e7 100644
--- a/Framework/API/test/RemoteJobManagerFactoryTest.h
+++ b/Framework/API/test/RemoteJobManagerFactoryTest.h
@@ -88,12 +88,12 @@ public:
         "create() with inexistent and unsubscribed class should "
         "throw",
         jobManager = RemoteJobManagerFactory::Instance().create("Inexistent"),
-        std::runtime_error);
+        const std::runtime_error &);
 
     TSM_ASSERT_THROWS("create() with unsubscribed class should throw",
                       jobManager =
                           RemoteJobManagerFactory::Instance().create("FakeJM"),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   // minimal positive test
@@ -104,7 +104,7 @@ public:
         "create() with class name that is not defined in facilities should "
         "throw",
         jm = Mantid::API::RemoteJobManagerFactory::Instance().create("FakeJM"),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_exists() {
@@ -123,7 +123,7 @@ public:
     TS_ASSERT_THROWS(
         Mantid::API::RemoteJobManagerFactory::Instance().subscribe<FakeJM>(
             "FakeJM"),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(
         Mantid::API::RemoteJobManagerFactory::Instance().unsubscribe("FakeJM"));
     TS_ASSERT_THROWS_NOTHING(
@@ -147,11 +147,11 @@ public:
     // these are not in the facilities file
     TS_ASSERT_THROWS(
         jm = Mantid::API::RemoteJobManagerFactory::Instance().create("FakeJM"),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         jm = Mantid::API::RemoteJobManagerFactory::Instance().create(
             "FakeJMDeriv"),
-        std::runtime_error);
+        const std::runtime_error &);
 
     keys = Mantid::API::RemoteJobManagerFactory::Instance().getKeys();
     size_t after = keys.size();
@@ -184,7 +184,7 @@ public:
         "create() with " + FermiName + "in a facility other than " + SNSFac +
             " should fail",
         jm = Mantid::API::RemoteJobManagerFactory::Instance().create(FermiName),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
 
     // restore facility, always do this at the end
     Mantid::Kernel::ConfigService::Instance().setFacility(prevFac.name());
@@ -208,7 +208,7 @@ public:
             " should throw because its job manager is not declared",
         Mantid::API::IRemoteJobManager_sptr jobManager =
             Mantid::API::RemoteJobManagerFactory::Instance().create("Fermi"),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
 
     // restore facility, always do this at the end
     Mantid::Kernel::ConfigService::Instance().setFacility(prevFac.name());
diff --git a/Framework/API/test/RunTest.h b/Framework/API/test/RunTest.h
index a94079f1c571bd5fd2a28f8927936eee088f50ec..46fb324b04a6c9d9065299ed5de7ff5d9b840166 100644
--- a/Framework/API/test/RunTest.h
+++ b/Framework/API/test/RunTest.h
@@ -89,7 +89,7 @@ public:
     TS_ASSERT(!pp->name().compare("Test"));
     TS_ASSERT(dynamic_cast<ConcreteProperty *>(pp));
     TS_ASSERT_THROWS(pp = runInfo.getProperty("NotThere"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
 
     std::vector<Property *> props = runInfo.getProperties();
     TS_ASSERT(!props.empty());
@@ -160,7 +160,7 @@ public:
   void test_GetTimeSeriesProperty_Throws_When_Log_Does_Not_Exist() {
     Run runInfo;
     TS_ASSERT_THROWS(runInfo.getTimeSeriesProperty<double>("not_a_log"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void
@@ -170,13 +170,13 @@ public:
     runInfo.addProperty(name, 5.6); // Standard double property
 
     TS_ASSERT_THROWS(runInfo.getTimeSeriesProperty<double>(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_GetPropertyAsType_Throws_When_Property_Does_Not_Exist() {
     Run runInfo;
     TS_ASSERT_THROWS(runInfo.getPropertyValueAsType<double>("not_a_log"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void test_GetPropertyAsType_Returns_Expected_Value_When_Type_Is_Correct() {
@@ -196,7 +196,7 @@ public:
     runInfo.addProperty("double_prop", 6.7); // Standard double property
 
     TS_ASSERT_THROWS(runInfo.getPropertyValueAsType<int>("double_prop"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -206,7 +206,7 @@ public:
     runInfo.addProperty<std::string>(name, "string"); // Adds a string property
 
     TS_ASSERT_THROWS(runInfo.getPropertyAsSingleValue(name),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_GetPropertyAsSingleValue_Does_Not_Throw_If_Type_Is_Int() {
@@ -282,10 +282,10 @@ public:
 
     std::vector<double> bins;
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     bins.push_back(0.5);
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     bins.push_back(1.5);
     TS_ASSERT_THROWS_NOTHING(runInfo.storeHistogramBinBoundaries(bins));
   }
@@ -296,27 +296,27 @@ public:
     std::vector<double> bins(2, 0.0);
 
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     bins[0] = -1.5;
     bins[1] = -1.5;
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     bins[0] = 2.1;
     bins[1] = 2.1;
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     bins[0] = -1.5;
     bins[1] = -1.6;
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     bins[0] = 2.1;
     bins[1] = 1.9;
     TS_ASSERT_THROWS(runInfo.storeHistogramBinBoundaries(bins),
-                     std::out_of_range);
+                     const std::out_of_range &);
   }
 
   void test_storeHistogramBinBoundaries_Succeeds_With_Valid_Bins() {
@@ -331,7 +331,8 @@ public:
   void test_histogramBinBoundaries_Throws_RuntimeError_For_New_Run() {
     Run runInfo;
 
-    TS_ASSERT_THROWS(runInfo.histogramBinBoundaries(1.5), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.histogramBinBoundaries(1.5),
+                     const std::runtime_error &);
   }
 
   void
@@ -342,10 +343,10 @@ public:
 
     TS_ASSERT_THROWS(
         runInfo.histogramBinBoundaries(m_test_energy_bins.front() - 1.3),
-        std::out_of_range);
+        const std::out_of_range &);
     TS_ASSERT_THROWS(
         runInfo.histogramBinBoundaries(m_test_energy_bins.back() + 1.3),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void
@@ -470,7 +471,8 @@ public:
     Goniometer gm;
     gm.makeUniversalGoniometer();
 
-    TS_ASSERT_THROWS(runInfo.setGoniometer(gm, true), std::runtime_error);
+    TS_ASSERT_THROWS(runInfo.setGoniometer(gm, true),
+                     const std::runtime_error &);
   }
 
   /** Setting up a goniometer and the angles to feed it
diff --git a/Framework/API/test/SampleTest.h b/Framework/API/test/SampleTest.h
index 0277dbe11f2057685eb537fe9d35c6e60a4f5103..aa993fc44fdb47362c4d20728e3942091e5a4284 100644
--- a/Framework/API/test/SampleTest.h
+++ b/Framework/API/test/SampleTest.h
@@ -55,7 +55,7 @@ public:
 
   void test_That_Requests_For_An_Undefined_Environment_Throw() {
     Sample sample;
-    TS_ASSERT_THROWS(sample.getEnvironment(), std::runtime_error);
+    TS_ASSERT_THROWS(sample.getEnvironment(), const std::runtime_error &);
   }
 
   void
@@ -212,7 +212,7 @@ public:
   void test_setCrystalStructure() {
     Sample sample;
     TS_ASSERT(!sample.hasCrystalStructure());
-    TS_ASSERT_THROWS(sample.getCrystalStructure(), std::runtime_error);
+    TS_ASSERT_THROWS(sample.getCrystalStructure(), const std::runtime_error &);
 
     CrystalStructure structure("3 4 5 90 90 90", "C m m m",
                                "Fe 0.12 0.23 0.121");
@@ -228,7 +228,7 @@ public:
   void test_clearCrystalStructure() {
     Sample sample;
     TS_ASSERT(!sample.hasCrystalStructure());
-    TS_ASSERT_THROWS(sample.getCrystalStructure(), std::runtime_error);
+    TS_ASSERT_THROWS(sample.getCrystalStructure(), const std::runtime_error &);
 
     CrystalStructure structure("3 4 5 90 90 90", "C m m m",
                                "Fe 0.12 0.23 0.121");
diff --git a/Framework/API/test/ScopedWorkspaceTest.h b/Framework/API/test/ScopedWorkspaceTest.h
index daab3013dc8157e3d802fbe8fa62fbd569adffef..bfd0fe322236ac95a46e5291021c6e8ab4754b2e 100644
--- a/Framework/API/test/ScopedWorkspaceTest.h
+++ b/Framework/API/test/ScopedWorkspaceTest.h
@@ -182,7 +182,7 @@ public:
 
     ScopedWorkspace test(ws);
 
-    TS_ASSERT_THROWS(ScopedWorkspace test2(ws), std::invalid_argument);
+    TS_ASSERT_THROWS(ScopedWorkspace test2(ws), const std::invalid_argument &);
   }
 
   void test_boolConversion() {
diff --git a/Framework/API/test/SpectraAxisTest.h b/Framework/API/test/SpectraAxisTest.h
index f92abc8b34a792fc607f7e316a058ba740498685..e8fe835ad36ba24cb96c954a8b194d3ef015cf2b 100644
--- a/Framework/API/test/SpectraAxisTest.h
+++ b/Framework/API/test/SpectraAxisTest.h
@@ -82,13 +82,13 @@ public:
   void testIsText() { TS_ASSERT(!spectraAxis->isText()); }
 
   void testOperatorBrackets() {
-    TS_ASSERT_THROWS((*spectraAxis)(-1), Exception::IndexError);
-    TS_ASSERT_THROWS((*spectraAxis)(5), Exception::IndexError);
+    TS_ASSERT_THROWS((*spectraAxis)(-1), const Exception::IndexError &);
+    TS_ASSERT_THROWS((*spectraAxis)(5), const Exception::IndexError &);
   }
 
   void testSpectraNo() {
-    TS_ASSERT_THROWS(spectraAxis->spectraNo(-1), Exception::IndexError);
-    TS_ASSERT_THROWS(spectraAxis->spectraNo(5), Exception::IndexError);
+    TS_ASSERT_THROWS(spectraAxis->spectraNo(-1), const Exception::IndexError &);
+    TS_ASSERT_THROWS(spectraAxis->spectraNo(5), const Exception::IndexError &);
 
     for (int i = 0; i < 5; ++i) {
       TS_ASSERT_EQUALS(spectraAxis->spectraNo(i), i + 1);
@@ -117,8 +117,9 @@ public:
 
   // --------------------------------------- Failure cases --------------------
   void testIndexOfValue_Throws_out_of_range_error_If_Input_Not_In_Range() {
-    TS_ASSERT_THROWS(spectraAxis->indexOfValue(0.49), std::out_of_range);
-    TS_ASSERT_THROWS(spectraAxis->indexOfValue(20.), std::out_of_range);
+    TS_ASSERT_THROWS(spectraAxis->indexOfValue(0.49),
+                     const std::out_of_range &);
+    TS_ASSERT_THROWS(spectraAxis->indexOfValue(20.), const std::out_of_range &);
   }
 
 private:
diff --git a/Framework/API/test/SpectrumDetectorMappingTest.h b/Framework/API/test/SpectrumDetectorMappingTest.h
index cc77820b62162587c6de407f815295f9b195c4e5..b355f8e86c90778708f1cd8e2c53ea03992137f2 100644
--- a/Framework/API/test/SpectrumDetectorMappingTest.h
+++ b/Framework/API/test/SpectrumDetectorMappingTest.h
@@ -28,7 +28,7 @@ public:
 
   void test_workspace_constructor() {
     MatrixWorkspace_const_sptr ws;
-    TS_ASSERT_THROWS(SpectrumDetectorMapping map(ws), std::invalid_argument);
+    TS_ASSERT_THROWS(SpectrumDetectorMapping map(ws), const std::invalid_argument &);
   }
 
   void test_workspace_constructor_fills_map() {
@@ -53,7 +53,7 @@ public:
   void test_vector_constructor_unequal_lengths() {
     TS_ASSERT_THROWS(SpectrumDetectorMapping(std::vector<specnum_t>(2),
                                              std::vector<detid_t>(1)),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void check_the_map(const SpectrumDetectorMapping &map) {
@@ -123,9 +123,9 @@ public:
     specnum_t specs[2];
     detid_t detids[2];
     TS_ASSERT_THROWS(SpectrumDetectorMapping(nullptr, detids, 10),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(SpectrumDetectorMapping(specs, nullptr, 10),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_array_constructor() {
@@ -155,9 +155,9 @@ public:
     SpectrumDetectorMapping map(ws);
     // The happy path is tested in the methods above. Just test invalid entry
     // here.
-    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(1), std::out_of_range);
-    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(0), std::out_of_range);
-    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(-1), std::out_of_range);
+    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(1), const std::out_of_range &);
+    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(0), const std::out_of_range &);
+    TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(-1), const std::out_of_range &);
   }
 };
 
diff --git a/Framework/API/test/SpectrumInfoTest.h b/Framework/API/test/SpectrumInfoTest.h
index a78911299f3852592c39eec1f5c3ccabc95e5a77..9c4de57211ce71cc80d6eedc0f8d489bcaa3719c 100644
--- a/Framework/API/test/SpectrumInfoTest.h
+++ b/Framework/API/test/SpectrumInfoTest.h
@@ -80,7 +80,7 @@ public:
 
   void test_l1_no_instrument() {
     TS_ASSERT_THROWS(m_workspaceNoInstrument.spectrumInfo().l1(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_isMonitor() {
@@ -169,8 +169,8 @@ public:
     TS_ASSERT_DELTA(spectrumInfo.twoTheta(1), 0.0, 1e-6);
     TS_ASSERT_DELTA(spectrumInfo.twoTheta(2), 0.0199973, 1e-6);
     // Monitors
-    TS_ASSERT_THROWS(spectrumInfo.twoTheta(3), std::logic_error);
-    TS_ASSERT_THROWS(spectrumInfo.twoTheta(4), std::logic_error);
+    TS_ASSERT_THROWS(spectrumInfo.twoTheta(3), const std::logic_error &);
+    TS_ASSERT_THROWS(spectrumInfo.twoTheta(4), const std::logic_error &);
   }
 
   void test_twoTheta_grouped() {
@@ -220,8 +220,8 @@ public:
     TS_ASSERT_DELTA(spectrumInfo.signedTwoTheta(1), 0.0, 1e-6);
     TS_ASSERT_DELTA(spectrumInfo.signedTwoTheta(2), 0.0199973, 1e-6);
     // Monitors
-    TS_ASSERT_THROWS(spectrumInfo.signedTwoTheta(3), std::logic_error);
-    TS_ASSERT_THROWS(spectrumInfo.signedTwoTheta(4), std::logic_error);
+    TS_ASSERT_THROWS(spectrumInfo.signedTwoTheta(3), const std::logic_error &);
+    TS_ASSERT_THROWS(spectrumInfo.signedTwoTheta(4), const std::logic_error &);
   }
 
   void test_grouped_signedTwoTheta() {
@@ -427,16 +427,16 @@ public:
   void test_no_detector() {
     const auto &spectrumInfo = m_workspaceNoInstrument.spectrumInfo();
     TS_ASSERT_THROWS(spectrumInfo.detector(0),
-                     Kernel::Exception::NotFoundError);
+                     const Kernel::Exception::NotFoundError &);
   }
 
   void test_no_detector_twice() {
     // Regression test: Make sure that *repeated* access also fails.
     const auto &spectrumInfo = m_workspaceNoInstrument.spectrumInfo();
     TS_ASSERT_THROWS(spectrumInfo.detector(0),
-                     Kernel::Exception::NotFoundError);
+                     const Kernel::Exception::NotFoundError &);
     TS_ASSERT_THROWS(spectrumInfo.detector(0),
-                     Kernel::Exception::NotFoundError);
+                     const Kernel::Exception::NotFoundError &);
   }
 
   void test_ExperimentInfo_basics() {
@@ -487,7 +487,7 @@ public:
     // needs to be able to rely on this.
     det2group_map mapping{{1, {1, 2}}};
     TS_ASSERT_THROWS(m_workspace.cacheDetectorGroupings(mapping),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   /**
diff --git a/Framework/API/test/TempFunctionTest.h b/Framework/API/test/TempFunctionTest.h
index 5a2b7cb438b7d01966e86b2b9ed27e65bd23ef8e..8432d1c096c1e4d341d14e02b7e20d94ccfd7825 100644
--- a/Framework/API/test/TempFunctionTest.h
+++ b/Framework/API/test/TempFunctionTest.h
@@ -75,8 +75,10 @@ public:
   }
 
   void test_domain_create() {
-    TS_ASSERT_THROWS(Mantid::API::FunctionDomain d(0), std::invalid_argument);
-    TS_ASSERT_THROWS(Mantid::API::FunctionDomain d(-10), std::length_error);
+    TS_ASSERT_THROWS(Mantid::API::FunctionDomain d(0),
+                     const std::invalid_argument &);
+    TS_ASSERT_THROWS(Mantid::API::FunctionDomain d(-10),
+                     const std::length_error &);
     TS_ASSERT_THROWS_NOTHING(Mantid::API::FunctionDomain d(1));
   }
 };
diff --git a/Framework/API/test/TextAxisTest.h b/Framework/API/test/TextAxisTest.h
index deeaf162fd429e15b522285c9337b16040522e72..b32810b03ddff7fe0e0ec393b82ee84b0361a55f 100644
--- a/Framework/API/test/TextAxisTest.h
+++ b/Framework/API/test/TextAxisTest.h
@@ -28,7 +28,7 @@ public:
     TS_ASSERT_EQUALS(ta.length(), 3);
     TS_ASSERT(ta.unit());
     TS_ASSERT_EQUALS(ta(0), Mantid::EMPTY_DBL());
-    TS_ASSERT_THROWS(ta.setValue(0, 10.), std::domain_error);
+    TS_ASSERT_THROWS(ta.setValue(0, 10.), const std::domain_error &);
     TS_ASSERT(ta.isText());
   }
 
diff --git a/Framework/API/test/VectorParameterParserTest.h b/Framework/API/test/VectorParameterParserTest.h
index 57d0d709edc85b7c27b75c433c96335976b4b88a..4add39bd70a5df5081f328c34170c0c592bb187c 100644
--- a/Framework/API/test/VectorParameterParserTest.h
+++ b/Framework/API/test/VectorParameterParserTest.h
@@ -96,7 +96,7 @@ public:
 
     ConcreteVectorDblParamParser parser;
     TSM_ASSERT_THROWS("No successor, so should throw!",
-                      parser.createParameter(pRootElem), std::runtime_error);
+                      parser.createParameter(pRootElem), const std::runtime_error &);
   }
 
   DECLARE_VECTOR_PARAMETER(SucessorVectorParameter, double)
@@ -161,7 +161,7 @@ public:
     ConcreteVectorBoolParamParser parser;
     TSM_ASSERT_THROWS("Should throw since delegation is not possible.",
                       parser.createWithoutDelegation(pRootElem),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   void testCreateWithoutDelegation() {
diff --git a/Framework/API/test/VectorParameterTest.h b/Framework/API/test/VectorParameterTest.h
index d2165ec7f0a3668a7442dc7d8f4e7b924e3e1ea1..b237a50e20764ff171d22e84a95ef77cf2e332ca 100644
--- a/Framework/API/test/VectorParameterTest.h
+++ b/Framework/API/test/VectorParameterTest.h
@@ -89,7 +89,7 @@ public:
   void testToXMLStringThrows() {
     ConcreteVectorDblParam param;
     TSM_ASSERT_THROWS("Should throw if trying to serialize and invalid object",
-                      param.toXMLString(), std::runtime_error);
+                      param.toXMLString(), const std::runtime_error &);
   }
 
   void testToXMLString() {
diff --git a/Framework/API/test/WorkspaceFactoryTest.h b/Framework/API/test/WorkspaceFactoryTest.h
index 608bef6e1262f3b457fa5154619319c29d057703..5bf6bb37c2fa990f75489200796db39fcf5df626 100644
--- a/Framework/API/test/WorkspaceFactoryTest.h
+++ b/Framework/API/test/WorkspaceFactoryTest.h
@@ -126,7 +126,7 @@ public:
     MatrixWorkspace_sptr nif(new NotInFactory);
     nif->initialize(1, 1, 1);
     TS_ASSERT_THROWS(child = WorkspaceFactory::Instance().create(nif),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testAccordingToSize() {
@@ -145,10 +145,10 @@ public:
 
     TS_ASSERT_THROWS(
         WorkspaceFactory::Instance().create("NotInFactory", 1, 1, 1),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         WorkspaceFactory::Instance().create("NotInFactory", 10, 10, 10),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/Framework/API/test/WorkspaceGroupTest.h b/Framework/API/test/WorkspaceGroupTest.h
index 7ac691e210c0a0d1c2dfcbb358dcacdc00719312..058a8062e1f1232f7fe21c47bf6fa5f88cc4957c 100644
--- a/Framework/API/test/WorkspaceGroupTest.h
+++ b/Framework/API/test/WorkspaceGroupTest.h
@@ -133,7 +133,7 @@ public:
     TS_ASSERT(group->contains("ws0"));
     // cannot add a workspace which doesn't exist
     TS_ASSERT_THROWS(group->add("noworkspace"),
-                     Kernel::Exception::NotFoundError);
+                     const Kernel::Exception::NotFoundError &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -206,8 +206,8 @@ public:
     Workspace_sptr ws11 = group->getItem("ws1");
     TS_ASSERT_EQUALS(ws1, ws11);
     // Test for failure too
-    TS_ASSERT_THROWS(group->getItem("non-existent"), std::out_of_range);
-    TS_ASSERT_THROWS(group->getItem(""), std::out_of_range);
+    TS_ASSERT_THROWS(group->getItem("non-existent"), const std::out_of_range &);
+    TS_ASSERT_THROWS(group->getItem(""), const std::out_of_range &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -222,7 +222,7 @@ public:
 
   void test_removeItem() {
     WorkspaceGroup_sptr group1 = makeGroup();
-    TS_ASSERT_THROWS(group1->removeItem(1), std::runtime_error);
+    TS_ASSERT_THROWS(group1->removeItem(1), const std::runtime_error &);
 
     WorkspaceGroup_sptr group(new WorkspaceGroup());
     Workspace_sptr ws1(new WorkspaceTester());
@@ -373,7 +373,7 @@ public:
     // catch a cycle
     group1->addWorkspace(group);
     Workspace_sptr b = boost::make_shared<WorkspaceTester>();
-    TS_ASSERT_THROWS(group->isInGroup(*b), std::runtime_error);
+    TS_ASSERT_THROWS(group->isInGroup(*b), const std::runtime_error &);
     group1->removeAll();
   }
 
diff --git a/Framework/API/test/WorkspaceHistoryTest.h b/Framework/API/test/WorkspaceHistoryTest.h
index f56b2a1d37605554870510aef46e330c4f13dba9..1b7c732c7536d92451c4744372244462790add61 100644
--- a/Framework/API/test/WorkspaceHistoryTest.h
+++ b/Framework/API/test/WorkspaceHistoryTest.h
@@ -133,8 +133,8 @@ public:
 
   void test_Empty_History_Throws_When_Retrieving_Attempting_To_Algorithms() {
     WorkspaceHistory emptyHistory;
-    TS_ASSERT_THROWS(emptyHistory.lastAlgorithm(), std::out_of_range);
-    TS_ASSERT_THROWS(emptyHistory.getAlgorithm(1), std::out_of_range);
+    TS_ASSERT_THROWS(emptyHistory.lastAlgorithm(), const std::out_of_range &);
+    TS_ASSERT_THROWS(emptyHistory.getAlgorithm(1), const std::out_of_range &);
   }
 };
 
diff --git a/Framework/API/test/WorkspaceOpOverloadsTest.h b/Framework/API/test/WorkspaceOpOverloadsTest.h
index 23dfb89bb9c9b303f4a917160aef668f03d45ecc..da551009eb8c514d2c82f0d9c7d313c1df831a08 100644
--- a/Framework/API/test/WorkspaceOpOverloadsTest.h
+++ b/Framework/API/test/WorkspaceOpOverloadsTest.h
@@ -170,7 +170,7 @@ public:
     TS_ASSERT(!ws->isDistribution());
 
     TS_ASSERT_THROWS(WorkspaceHelpers::makeDistribution(ws),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 };
 
diff --git a/Framework/API/test/WorkspacePropertyTest.h b/Framework/API/test/WorkspacePropertyTest.h
index a14ec4713700b73e73fd6ac9146ac504df395d62..5e53ae3b7c92eabcf15306a41a5f95343bed447b 100644
--- a/Framework/API/test/WorkspacePropertyTest.h
+++ b/Framework/API/test/WorkspacePropertyTest.h
@@ -77,7 +77,7 @@ public:
 
   void testConstructor() {
     TS_ASSERT_THROWS(WorkspaceProperty<Workspace>("test", "", 3),
-                     std::out_of_range)
+                     const std::out_of_range &)
   }
 
   void testValue() {
@@ -296,7 +296,7 @@ public:
 
     // Since no workspace has been assigned to this output property, it should
     // throw
-    TS_ASSERT_THROWS(wsp2->store(), std::runtime_error)
+    TS_ASSERT_THROWS(wsp2->store(), const std::runtime_error &)
     // So now create and assign the workspace and test again
     Workspace_sptr space;
     TS_ASSERT_THROWS_NOTHING(space = WorkspaceFactory::Instance().create(
diff --git a/Framework/Algorithms/src/MergeRuns.cpp b/Framework/Algorithms/src/MergeRuns.cpp
index 4c3d1183a4d3e5c5198a32b6693190503089bdd4..6930ab79403b9c0a7af4970f9ce015d26a4649a4 100644
--- a/Framework/Algorithms/src/MergeRuns.cpp
+++ b/Framework/Algorithms/src/MergeRuns.cpp
@@ -612,7 +612,7 @@ void MergeRuns::intersectionParams(const HistogramX &X1, size_t &i,
   }
   auto const overlapbins2 = std::distance(X2.cbegin(), iterX2);
   // We want to use whichever one has the larger bins (on average)
-  if (static_cast<decltype(overlapbins2)>(overlapbins1) < overlapbins2) {
+  if (overlapbins1 < static_cast<size_t>(overlapbins2)) {
     // In this case we want the rest of the bins from the first workspace.....
     for (; i < X1.size(); ++i) {
       params.emplace_back(X1[i] - X1[i - 1]);
diff --git a/Framework/Algorithms/src/RadiusSum.cpp b/Framework/Algorithms/src/RadiusSum.cpp
index bee835c8e59f506e8b0019bb70066395d1f4826c..662f77a851c6e39e1223f1ef9ce630f41603190c 100644
--- a/Framework/Algorithms/src/RadiusSum.cpp
+++ b/Framework/Algorithms/src/RadiusSum.cpp
@@ -291,8 +291,8 @@ std::vector<double> RadiusSum::getBoundariesOfInputWorkspace() {
  *
  *  It is important that the input workspace must be a numeric image, and not an
  *instrument related workspace.
- *  The function will raise exception (std::invalid_argument) if an invalid
- *input is give.
+ *  The function will raise exception (std::const invalid_argument &) if an
+ *invalid input is give.
  *
  *  @see RadiusSum::inputWorkspaceHasInstrumentAssociated for reference.
  *
@@ -474,9 +474,8 @@ RadiusSum::getBoundariesOfInstrument(API::MatrixWorkspace_sptr inWS) {
  *
  *  It will test that all the values of the centre is inside their respective
  *dominium.
- *  If the test fails, it will raise an exception (invalid_argument) to express
- *that
- *  the given centre is not inside the boundaries.
+ *  If the test fails, it will raise an exception (const invalid_argument &) to
+ *express that the given centre is not inside the boundaries.
  */
 void RadiusSum::centerIsInsideLimits(const std::vector<double> &centre,
                                      const std::vector<double> &boundaries) {
diff --git a/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp b/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp
index 27a808ddc80e15a6b6ff8b3bc5e380ba14814c18..4532bca3e76f62545502b77d4eda819a4407b1a3 100644
--- a/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp
+++ b/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp
@@ -1117,7 +1117,7 @@ MatrixWorkspace_sptr ReflectometryReductionOneAuto2::getFloodWorkspace() {
         // If the first part is a number treat all parts as run numbers
         boost::lexical_cast<size_t>(parts.front());
         fileName = instrument->getName() + Strings::toString(parts);
-      } catch (boost::bad_lexical_cast) {
+      } catch (const boost::bad_lexical_cast &) {
         // Do nothing fileName == floodRunParam
       }
       auto alg = createChildAlgorithm("CreateFloodWorkspace");
diff --git a/Framework/Algorithms/test/AddNoteTest.h b/Framework/Algorithms/test/AddNoteTest.h
index 0dae3dddfdbd4d1c1dc6e7a2b1d9ff293d193acf..258f2bad3041545969f7d289cfb7488bdb84ba74 100644
--- a/Framework/Algorithms/test/AddNoteTest.h
+++ b/Framework/Algorithms/test/AddNoteTest.h
@@ -55,14 +55,14 @@ public:
     Mantid::Algorithms::AddNote alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), const std::invalid_argument &);
   }
 
   void test_empty_value_not_allowed() {
     Mantid::Algorithms::AddNote alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), const std::invalid_argument &);
   }
 
   void test_empty_time_is_allowed() {
@@ -77,7 +77,7 @@ public:
     run.addProperty<std::string>("Test Name", "Test");
     TS_ASSERT_THROWS(
         executeAlgorithm(ws, "Test Name", "2010-09-14T04:20:12", "Test String"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_Init() {
diff --git a/Framework/Algorithms/test/AddTimeSeriesLogTest.h b/Framework/Algorithms/test/AddTimeSeriesLogTest.h
index b166efd33f9c9661fd0a0405c1705092772c46d8..194e9feff6a76dda436a038770be669336270b89 100644
--- a/Framework/Algorithms/test/AddTimeSeriesLogTest.h
+++ b/Framework/Algorithms/test/AddTimeSeriesLogTest.h
@@ -81,21 +81,21 @@ public:
     Mantid::Algorithms::AddTimeSeriesLog alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), const std::invalid_argument &);
   }
 
   void test_empty_time_not_allowed() {
     Mantid::Algorithms::AddTimeSeriesLog alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("Time", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("Time", ""), const std::invalid_argument &);
   }
 
   void test_empty_value_not_allowed() {
     Mantid::Algorithms::AddTimeSeriesLog alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), const std::invalid_argument &);
   }
 
   void test_time_as_non_iso_formatted_string_throws_invalid_argument() {
@@ -103,11 +103,11 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("Time", "NotATime"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue("Time", "2014 03 31 09 30"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue("Time", "09:30:00"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_algorithm_fails_if_log_exists_but_is_not_a_time_series() {
@@ -116,7 +116,7 @@ public:
     run.addProperty<double>("Test Name", 1.0);
     TS_ASSERT_THROWS(
         executeAlgorithm(ws, "Test Name", "2010-09-14T04:20:12", 20.0),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_algorithm_fails_if_time_series_exists_but_it_is_incorrect_type() {
@@ -128,7 +128,7 @@ public:
     run.addLogData(timeSeries);
     TS_ASSERT_THROWS(
         executeAlgorithm(ws, logName, "2010-09-14T04:20:30", 30, Integer),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/AlignDetectorsTest.h b/Framework/Algorithms/test/AlignDetectorsTest.h
index c59a8bc8bd07af20bbe5a98e62c59e5a3d401926..f99881cac5083342e47ae28390dda7872e680308 100644
--- a/Framework/Algorithms/test/AlignDetectorsTest.h
+++ b/Framework/Algorithms/test/AlignDetectorsTest.h
@@ -58,7 +58,7 @@ public:
     if (!align.isInitialized())
       align.initialize();
 
-    TS_ASSERT_THROWS(align.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(align.execute(), const std::runtime_error &);
 
     align.setPropertyValue("InputWorkspace", inputWS);
     const std::string outputWS = "aligned";
diff --git a/Framework/Algorithms/test/AnnularRingAbsorptionTest.h b/Framework/Algorithms/test/AnnularRingAbsorptionTest.h
index dba060730272a65f71e46b790cab9488625fa540..e510cbe69a23f01a1789f873245befdbd2d64544 100644
--- a/Framework/Algorithms/test/AnnularRingAbsorptionTest.h
+++ b/Framework/Algorithms/test/AnnularRingAbsorptionTest.h
@@ -67,7 +67,7 @@ public:
 
     TS_ASSERT_THROWS(
         alg->setProperty<MatrixWorkspace_sptr>("InputWorkspace", testWS),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_Workspace_With_Units_Not_In_Wavelength_Is_Not_Accepted() {
@@ -80,7 +80,7 @@ public:
 
     TS_ASSERT_THROWS(
         alg->setProperty<MatrixWorkspace_sptr>("InputWorkspace", inputWS),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_Invalid_Sample_Material_Throws_Error() {
@@ -91,7 +91,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(alg->setProperty("InputWorkspace", inputWS));
     TS_ASSERT_THROWS_NOTHING(alg->setProperty("SampleChemicalFormula", "A-lO"));
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     TS_ASSERT(!alg->isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/AnyShapeAbsorptionTest.h b/Framework/Algorithms/test/AnyShapeAbsorptionTest.h
index 3dca7b1cc1084f9ac6f69d6275c02eb5e768036e..d6cc1e4fde53d3bc11fd96b455ae3e700dd845b1 100644
--- a/Framework/Algorithms/test/AnyShapeAbsorptionTest.h
+++ b/Framework/Algorithms/test/AnyShapeAbsorptionTest.h
@@ -245,7 +245,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         atten.setPropertyValue("SampleNumberDensity", "0.07192"));
     atten.setRethrows(true); // needed for the next check to work
-    TS_ASSERT_THROWS(atten.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(atten.execute(), const std::runtime_error &);
     TS_ASSERT(!atten.isExecuted());
 
     AnalysisDataService::Instance().remove(flatWS);
@@ -317,7 +317,7 @@ public:
     absAlg.setPropertyValue("OutputWorkspace", ENV_WS);
     absAlg.setProperty("ScatterFrom", "Environment");
     absAlg.setProperty("EMode", "Elastic");
-    TS_ASSERT_THROWS(absAlg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(absAlg.execute(), const std::runtime_error &);
 
     // verify the sample term is bigger than the container term because the
     // material contains Li7
diff --git a/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h b/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h
index 4f643dcbf5bd0d456eb1bf6ab7384adfdc552f3a..953ecd5e73ee6a0cc455eb395b0308dfa3728654 100644
--- a/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h
+++ b/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h
@@ -229,7 +229,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("dPerpendicularBinning", "1,2,5"));
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("NormalizeByBinArea", "0"));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/BinaryOperationTest.h b/Framework/Algorithms/test/BinaryOperationTest.h
index 44a13b341f07609300e3acf9fb7ccf6c89d17bc7..b9014a07ba9d4bb8ae33319483ae2745a3d847fe 100644
--- a/Framework/Algorithms/test/BinaryOperationTest.h
+++ b/Framework/Algorithms/test/BinaryOperationTest.h
@@ -306,7 +306,7 @@ public:
     if (expect_throw) {
       TS_ASSERT_THROWS(
           table = BinaryOperation::buildBinaryOperationTable(lhsWS, rhsWS),
-          std::runtime_error);
+          const std::runtime_error &);
     } else {
       TS_ASSERT_THROWS_NOTHING(
           table = BinaryOperation::buildBinaryOperationTable(lhsWS, rhsWS));
diff --git a/Framework/Algorithms/test/CalculateIqtTest.h b/Framework/Algorithms/test/CalculateIqtTest.h
index 75c03b2a811f3c3fa4a093b4bb91aae4c3f20166..f4ff102d724104a599549b67edef2b5c4e569666 100644
--- a/Framework/Algorithms/test/CalculateIqtTest.h
+++ b/Framework/Algorithms/test/CalculateIqtTest.h
@@ -123,7 +123,7 @@ public:
     auto energyMax = -1; // invalid - less than energyMin
     auto algorithm = calculateIqtAlgorithm(
         m_sampleWorkspace, m_resolutionWorkspace, energyMin, energyMax);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
     TS_ASSERT(!algorithm->isExecuted());
   }
 
@@ -132,7 +132,7 @@ public:
     TS_ASSERT_THROWS(calculateIqtAlgorithm(m_sampleWorkspace,
                                            m_resolutionWorkspace, -0.5, 0.5,
                                            0.1, nIterations),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_throws_if_number_of_iterations_is_zero() {
@@ -140,7 +140,7 @@ public:
     TS_ASSERT_THROWS(calculateIqtAlgorithm(m_sampleWorkspace,
                                            m_resolutionWorkspace, -0.5, 0.5,
                                            0.1, nIterations),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   // void test_throws_if_number_of_iterations_is_not_an_integer() {
@@ -148,7 +148,7 @@ public:
   //  TS_ASSERT_THROWS(calculateIqtAlgorithm(m_sampleWorkspace,
   //                                         m_resolutionWorkspace, -0.5, 0.5,
   //                                         0.1, nIterations),
-  //                   std::invalid_argument);
+  //                   const std::invalid_argument &);
   //}
 };
 #endif
diff --git a/Framework/Algorithms/test/ConjoinWorkspacesTest.h b/Framework/Algorithms/test/ConjoinWorkspacesTest.h
index 50593ac02a5804f03db1ea7ecbb10b1f8b849b09..0027cfd16fb30ea179b7914da25af487034ec16d 100644
--- a/Framework/Algorithms/test/ConjoinWorkspacesTest.h
+++ b/Framework/Algorithms/test/ConjoinWorkspacesTest.h
@@ -98,7 +98,7 @@ public:
     in2->mutableSpectrumInfo().setMasked(maskBottom, true);
 
     // Check it fails if properties haven't been set
-    TS_ASSERT_THROWS(conj.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(conj.execute(), const std::runtime_error &);
     TS_ASSERT(!conj.isExecuted());
 
     // Check it fails if input overlap
@@ -136,7 +136,7 @@ public:
 
     // Check that 2nd input workspace no longer exists
     TS_ASSERT_THROWS(AnalysisDataService::Instance().retrieve("bottom"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
 
     // Check that th workspace has the correct number of history entries
     TS_ASSERT_EQUALS(output->getHistory().size(), 3);
@@ -176,7 +176,7 @@ public:
     conj.setProperty("InputWorkspace1", "testMismatchedEventWorkspace1");
     conj.setProperty("InputWorkspace2", "testMismatchedEventWorkspace2");
 
-    TS_ASSERT_THROWS(conj.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(conj.execute(), const std::invalid_argument &);
     TS_ASSERT(!conj.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/ConjoinXRunsTest.h b/Framework/Algorithms/test/ConjoinXRunsTest.h
index 836e6983168009fffd1cc36981ad7097524c683f..bbb091e64a786970fb50e6824c313a71e976f3fa 100644
--- a/Framework/Algorithms/test/ConjoinXRunsTest.h
+++ b/Framework/Algorithms/test/ConjoinXRunsTest.h
@@ -163,7 +163,7 @@ public:
 
     m_testee.setProperty("InputWorkspaces",
                          std::vector<std::string>{"ws1", "ws5"});
-    TS_ASSERT_THROWS(m_testee.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_testee.execute(), const std::runtime_error &);
   }
 
   void testPassDifferentAxes() {
@@ -220,7 +220,7 @@ public:
     m_testee.setProperty("SampleLogAsXAxis", "TestNumLog");
 
     // blocksize must be one in case of scalar log, fail
-    TS_ASSERT_THROWS(m_testee.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_testee.execute(), const std::runtime_error &);
   }
 
   void testPassWithNumLog() {
@@ -275,7 +275,7 @@ public:
     m_testee.setProperty("SampleLogAsXAxis", "TestStrLog");
 
     // string log not supported, fail
-    TS_ASSERT_THROWS(m_testee.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_testee.execute(), const std::runtime_error &);
   }
 
   void testPassWithNumSeriesLog() {
@@ -347,7 +347,7 @@ public:
                          std::vector<std::string>{"ws1", "ws2"});
 
     // ws1 has 3 bins, ws2 has 2, fail
-    TS_ASSERT_THROWS(m_testee.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_testee.execute(), const std::runtime_error &);
   }
 
   void testMergeSampleLogFail() {
@@ -371,7 +371,7 @@ public:
     m_testee.setProperty("InputWorkspaces",
                          std::vector<std::string>{"ws1", "ws2"});
 
-    TS_ASSERT_THROWS(m_testee.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_testee.execute(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h b/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h
index 1b51250300c638355450109f4c8050c8f0fd4e36..9c1fc1e696cd75ee26fe66e9a7d568059182efe4 100644
--- a/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h
+++ b/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h
@@ -59,7 +59,8 @@ private:
     TS_ASSERT(thetaAxis->isNumeric());
 
     // Check axis is correct length for the workspaces.
-    TS_ASSERT_THROWS((*thetaAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*thetaAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     // Check the outputs for the workspaces are correct.
     TS_ASSERT_EQUALS(thetaAxis->unit()->caption(), "Scattering angle");
@@ -97,7 +98,8 @@ private:
     TS_ASSERT_EQUALS(input->e(1), output->e(1));
 
     // Check workspace axes are of correct length.
-    TS_ASSERT_THROWS((*thetaAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*thetaAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
   }
 
   void clean_up_workspaces(const std::string inputWS,
@@ -195,7 +197,7 @@ public:
         conv.setPropertyValue("OutputWorkspace", outputWS));
     TS_ASSERT_THROWS_NOTHING(conv.setPropertyValue("Target", target));
 
-    TS_ASSERT_THROWS(conv.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(conv.execute(), const std::invalid_argument &);
     TS_ASSERT(!conv.isExecuted());
 
     // Clean up workspaces.
@@ -228,7 +230,8 @@ public:
     TS_ASSERT_DELTA((*qAxis)(2), 0.0878, 1.0000e-4);
 
     // Check axis is correct length
-    TS_ASSERT_THROWS((*qAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*qAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     TS_ASSERT_EQUALS(input->x(0), output->x(0));
     TS_ASSERT_EQUALS(input->y(0), output->y(0));
@@ -270,7 +273,8 @@ public:
     TS_ASSERT_DELTA((*qAxis)(2), 2 * M_PI / DBL_MIN, 1e-10);
 
     // Check axis is correct length
-    TS_ASSERT_THROWS((*qAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*qAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     TS_ASSERT_EQUALS(input->x(0), output->x(0));
     TS_ASSERT_EQUALS(input->y(0), output->y(0));
@@ -312,7 +316,8 @@ public:
     TS_ASSERT_DELTA((*q2Axis)(2), 0.00771, 1.0000e-5);
 
     // Check axis is correct length
-    TS_ASSERT_THROWS((*q2Axis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*q2Axis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     TS_ASSERT_EQUALS(input->x(0), output->x(0));
     TS_ASSERT_EQUALS(input->y(0), output->y(0));
@@ -374,7 +379,8 @@ public:
     TS_ASSERT_DELTA((*qAxis)(2), 0.0439, 1.0000e-4);
 
     // Check axis is of correct length.
-    TS_ASSERT_THROWS((*qAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*qAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     // Clean up workspaces.
     clean_up_workspaces(inputWS, outputWS);
@@ -428,7 +434,8 @@ public:
     TS_ASSERT_DELTA((*qAxis)(2), 0.004393, 1.0000e-6);
 
     // Check axis is of correct length.
-    TS_ASSERT_THROWS((*qAxis)(3), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*qAxis)(3),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     TS_ASSERT(conv.isExecuted());
 
diff --git a/Framework/Algorithms/test/ConvertSpectrumAxisTest.h b/Framework/Algorithms/test/ConvertSpectrumAxisTest.h
index a0a8930891d4754688e708c0653712743a958e8f..e948021f956e12f6808dce2530aca2fe9937ba4e 100644
--- a/Framework/Algorithms/test/ConvertSpectrumAxisTest.h
+++ b/Framework/Algorithms/test/ConvertSpectrumAxisTest.h
@@ -83,7 +83,8 @@ public:
     TS_ASSERT_DELTA((*thetaAxis)(0), 6.0883, 0.0001);
     TS_ASSERT_DELTA((*thetaAxis)(1), 180.0, 0.0001);
     // Check axis is correct length
-    TS_ASSERT_THROWS((*thetaAxis)(2), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*thetaAxis)(2),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     // Data should be swapped over
     TS_ASSERT_EQUALS(input->x(0), output->x(1));
@@ -142,7 +143,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(conv.setPropertyValue("Target", "DeltaE"));
     TS_ASSERT_THROWS_NOTHING(conv.setPropertyValue("EMode", "Indirect"));
     conv.setRethrows(true);
-    TS_ASSERT_THROWS(conv.execute(), std::logic_error);
+    TS_ASSERT_THROWS(conv.execute(), const std::logic_error &);
 
     TS_ASSERT_THROWS_NOTHING(conv.setPropertyValue("Efixed", "1.845"));
     TS_ASSERT_THROWS_NOTHING(conv.execute());
@@ -166,7 +167,8 @@ public:
     TS_ASSERT_DELTA((*thetaAxis)(0), 0.00311225, 1e-08);
     TS_ASSERT_DELTA((*thetaAxis)(1), 0.00311225, 1e-08);
     // Check axis is correct length
-    TS_ASSERT_THROWS((*thetaAxis)(2), Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS((*thetaAxis)(2),
+                     const Mantid::Kernel::Exception::IndexError &);
 
     AnalysisDataService::Instance().remove(inputWS);
     AnalysisDataService::Instance().remove(outputWS);
diff --git a/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h b/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h
index 685af86ab51dbf5ebb3f3f7be688b4fd9279b28d..f8080359c44121a66ef935c8ccf3811d73cf04ff 100644
--- a/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h
+++ b/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h
@@ -127,7 +127,7 @@ public:
   }
 
   void test_fail_on_empty_table() {
-    TS_ASSERT_THROWS(m_converter->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(m_converter->execute(), const std::runtime_error &);
   }
 
   void setUp() override {
@@ -224,7 +224,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(m_converter->setPropertyValue("ColumnY", "B"));
     TS_ASSERT_THROWS_NOTHING(m_converter->setPropertyValue("ColumnE", "C"));
 
-    TS_ASSERT_THROWS(m_converter->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(m_converter->execute(), const std::invalid_argument &);
     API::AnalysisDataService::Instance().remove("out");
   }
 
diff --git a/Framework/Algorithms/test/CopyDataRangeTest.h b/Framework/Algorithms/test/CopyDataRangeTest.h
index 54eb36720df1e6fca15daf831965c07119e1c865..4d9b1d221c5f9972b151f476f962f68a4d93a128 100644
--- a/Framework/Algorithms/test/CopyDataRangeTest.h
+++ b/Framework/Algorithms/test/CopyDataRangeTest.h
@@ -221,35 +221,35 @@ public:
   test_that_the_algorithm_throws_when_provided_a_StartWorkspaceIndex_which_is_larger_than_the_EndWorkspaceIndex() {
     auto algorithm = setUpAlgorithm(INPUT_NAME, DESTINATION_NAME, 2, 1, 2.1,
                                     2.4, 0, 0, OUTPUT_NAME);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
   }
 
   void
   test_that_the_algorithm_throws_when_provided_an_EndWorkspaceIndex_which_is_larger_than_the_number_of_histograms_in_the_input_workspace() {
     auto algorithm = setUpAlgorithm(INPUT_NAME, DESTINATION_NAME, 0, 5, 2.1,
                                     2.4, 0, 0, OUTPUT_NAME);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
   }
 
   void
   test_that_the_algorithm_throws_when_provided_a_xMin_which_comes_later_on_than_larger_than_xMax() {
     auto algorithm = setUpAlgorithm(INPUT_NAME, DESTINATION_NAME, 0, 3, 2.4,
                                     2.1, 0, 0, OUTPUT_NAME);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
   }
 
   void
   test_that_the_algorithm_throws_when_provided_a_block_of_data_which_will_not_fit_in_the_destination_workspace_in_the_y_direction() {
     auto algorithm = setUpAlgorithm(INPUT_NAME, DESTINATION_NAME, 0, 3, 2.1,
                                     2.4, 4, 0, OUTPUT_NAME);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
   }
 
   void
   test_that_the_algorithm_throws_when_provided_a_block_of_data_which_will_not_fit_in_the_destination_workspace_in_the_x_direction() {
     auto algorithm = setUpAlgorithm(INPUT_NAME, DESTINATION_NAME, 0, 3, 2.1,
                                     2.4, 0, 4, OUTPUT_NAME);
-    TS_ASSERT_THROWS(algorithm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algorithm->execute(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/CorrectToFileTest.h b/Framework/Algorithms/test/CorrectToFileTest.h
index b4c79845846592c18c0b2c7a7912d7d9ed4f1555..bb0b845ed0b2f824c4dc52c6201bea9d07cb72ff 100644
--- a/Framework/Algorithms/test/CorrectToFileTest.h
+++ b/Framework/Algorithms/test/CorrectToFileTest.h
@@ -152,7 +152,7 @@ public:
       correctToFile.initialize();
 
     // Executing now should throw since none of the properties have been set
-    TS_ASSERT_THROWS(correctToFile.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(correctToFile.execute(), const std::runtime_error &);
 
     // Register this with the service
     using namespace Mantid::API;
diff --git a/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h b/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h
index 5231504689c9a658ac88af52fb4908a4c4857ab2..8bd7cd90b2a38f6c81b59df44496052129e4dcff 100644
--- a/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h
+++ b/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h
@@ -155,7 +155,7 @@ public:
     TS_ASSERT(alg.isInitialized());
 
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", inpws),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_not_allowed_output_workspace_same_as_input() {
diff --git a/Framework/Algorithms/test/CreatePSDBleedMaskTest.h b/Framework/Algorithms/test/CreatePSDBleedMaskTest.h
index 2ebd43335f5a5c7d67396275fede5f0f99f85b73..0796f6d23024b733f7d955e74008caec2a42cc05 100644
--- a/Framework/Algorithms/test/CreatePSDBleedMaskTest.h
+++ b/Framework/Algorithms/test/CreatePSDBleedMaskTest.h
@@ -58,7 +58,7 @@ public:
 
     // First test that a workspace not containing the number of good frames
     // fails
-    TS_ASSERT_THROWS(diagnostic.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(diagnostic.execute(), const std::invalid_argument &);
 
     // Set the number of frames
     testWS->mutableRun().addProperty("goodfrm", 10);
diff --git a/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h b/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h
index aab0bbfa2631572409bf7e226d20d7232c38485d..dea56ace5ccbec389bd806f257509ba011b5cb1f 100644
--- a/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h
+++ b/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h
@@ -26,7 +26,7 @@ public:
 
     // First with no Error
     // Running algorithm here should throw
-    TS_ASSERT_THROWS(algNoErr.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algNoErr.execute(), const std::runtime_error &);
 
     // Set some properties
     std::string outputSpace("NoError");
@@ -66,7 +66,7 @@ public:
 
     // First with no Error
     // Running algorithm here should throw
-    TS_ASSERT_THROWS(algWithErr.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algWithErr.execute(), const std::runtime_error &);
 
     // Set some properties
     std::string outputSpace("WithError");
diff --git a/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h b/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h
index 570199c45d60f2e3ef12020a7737ee92ad435429..28045bbb762755dc80206c7b0bc0435b84e91c6f 100644
--- a/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h
+++ b/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h
@@ -95,13 +95,13 @@ public:
   void test_check_first_transmission_workspace_not_tof_or_wavelength_throws() {
     auto alg = construct_standard_algorithm();
     TS_ASSERT_THROWS(alg->setProperty("FirstTransmissionRun", m_NotTOF),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_check_second_transmission_workspace_not_tof_throws() {
     auto alg = construct_standard_algorithm();
     TS_ASSERT_THROWS(alg->setProperty("SecondTransmissionRun", m_NotTOF),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_end_overlap_must_be_greater_than_start_overlap_or_throw() {
@@ -112,7 +112,7 @@ public:
     alg->setProperty("Params", params);
     alg->setProperty("StartOverlap", 0.6);
     alg->setProperty("EndOverlap", 0.4);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_must_provide_wavelengths() {
@@ -124,20 +124,20 @@ public:
     alg->setProperty("SecondTransmissionRun", m_TOF);
     alg->setPropertyValue("OutputWorkspace", "demo_ws");
     alg->setRethrows(true);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
 
     alg->setProperty("FirstTransmissionRun", m_TOF);
     alg->setProperty("SecondTransmissionRun", m_TOF);
     alg->setProperty("WavelengthMin", 1.0);
     alg->setRethrows(true);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_wavelength_min_greater_wavelength_max_throws() {
     auto alg = construct_standard_algorithm();
     alg->setProperty("WavelengthMin", 1.0);
     alg->setProperty("WavelengthMax", 0.0);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void
@@ -145,7 +145,7 @@ public:
     auto alg = construct_standard_algorithm();
     alg->setProperty("MonitorBackgroundWavelengthMin", 1.0);
     alg->setProperty("MonitorBackgroundWavelengthMax", 0.0);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void
@@ -153,7 +153,7 @@ public:
     auto alg = construct_standard_algorithm();
     alg->setProperty("MonitorIntegrationWavelengthMin", 1.0);
     alg->setProperty("MonitorIntegrationWavelengthMax", 0.0);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_execute_one_tranmission() {
diff --git a/Framework/Algorithms/test/CreateWorkspaceTest.h b/Framework/Algorithms/test/CreateWorkspaceTest.h
index 3aa804fd1b9aad75a6e2fc8bae86a133029ddb49..a52d8565ae76430ee536c44e6da9a5384f922277 100644
--- a/Framework/Algorithms/test/CreateWorkspaceTest.h
+++ b/Framework/Algorithms/test/CreateWorkspaceTest.h
@@ -218,7 +218,7 @@ public:
     alg.setProperty<std::vector<double>>("DataE", values);
     alg.setProperty<std::vector<double>>("Dx", xVals);
 
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void testParenting() {
diff --git a/Framework/Algorithms/test/CropToComponentTest.h b/Framework/Algorithms/test/CropToComponentTest.h
index 1933f05d348a40122905cf2f3b80f5b95229756a..10e7e1afb946a1943b0382730a3ffb0a3bc843e5 100644
--- a/Framework/Algorithms/test/CropToComponentTest.h
+++ b/Framework/Algorithms/test/CropToComponentTest.h
@@ -161,7 +161,7 @@ public:
     crop.setProperty("OutputWorkspace", "dummy");
     crop.setProperty("ComponentNames", componentNames);
     TSM_ASSERT_THROWS("Invalid detector names will throw.", crop.execute(),
-                      std::runtime_error)
+                      const std::runtime_error &)
   }
 
   void test_that_det_ids_are_ordered() {
diff --git a/Framework/Algorithms/test/CropWorkspaceTest.h b/Framework/Algorithms/test/CropWorkspaceTest.h
index 7c403f1a1bcaea24c16d3765261d8d13e771959a..e0e1ffe7532e36153944f180a9c4b6858101b779 100644
--- a/Framework/Algorithms/test/CropWorkspaceTest.h
+++ b/Framework/Algorithms/test/CropWorkspaceTest.h
@@ -76,7 +76,7 @@ public:
     if (!crop.isInitialized())
       crop.initialize();
 
-    TS_ASSERT_THROWS(crop.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(crop.execute(), const std::runtime_error &);
     TS_ASSERT(!crop.isExecuted());
     TS_ASSERT_THROWS_NOTHING(
         crop.setPropertyValue("InputWorkspace", inputName));
diff --git a/Framework/Algorithms/test/CrossCorrelateTest.h b/Framework/Algorithms/test/CrossCorrelateTest.h
index f6f479f4879968d1ad8b6f888600feaa0cb05d94..036b3aa85cf93dd2c57914bbcfe91255087a2352 100644
--- a/Framework/Algorithms/test/CrossCorrelateTest.h
+++ b/Framework/Algorithms/test/CrossCorrelateTest.h
@@ -178,7 +178,7 @@ private:
   // Run the algorithm with invalid input and check that it throws a runtime
   // error
   void runAlgorithmThrows(CrossCorrelate &alg) {
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h b/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h
index eee6758308249007e6330f3229ce59fe31875255..83ae32a2b659f01709c120c20dc722a8b39e6e54 100644
--- a/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h
+++ b/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h
@@ -40,7 +40,7 @@ public:
 
     TS_ASSERT_THROWS(
         atten.setProperty<MatrixWorkspace_sptr>("InputWorkspace", testWS),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testFailsIfNoSampleShape() {
diff --git a/Framework/Algorithms/test/CylinderAbsorptionTest.h b/Framework/Algorithms/test/CylinderAbsorptionTest.h
index 056a4965e4349f046e3d003c534f7f26fa458c83..01f68cfdca444a39ac0f5289f5a9aa47900ee5cf 100644
--- a/Framework/Algorithms/test/CylinderAbsorptionTest.h
+++ b/Framework/Algorithms/test/CylinderAbsorptionTest.h
@@ -65,7 +65,7 @@ public:
 
     // intentionally skip the sample information
     configureAbsCommon(atten, testWS, "factors");
-    TS_ASSERT_THROWS(atten.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(atten.execute(), const std::invalid_argument &);
     TS_ASSERT(!atten.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/DeleteLogTest.h b/Framework/Algorithms/test/DeleteLogTest.h
index e38df87bab52b47d757d9847ba6eba461f0607f4..3b7337d6a787a4da7b5f152c286ca0f6e362235d 100644
--- a/Framework/Algorithms/test/DeleteLogTest.h
+++ b/Framework/Algorithms/test/DeleteLogTest.h
@@ -79,7 +79,7 @@ public:
   void test_empty_log_name_throws_invalid_argument() {
     Mantid::Algorithms::DeleteLog alg;
     alg.initialize();
-    TS_ASSERT_THROWS(alg.setProperty("Name", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("Name", ""), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Algorithms/test/DetectorEfficiencyCorTest.h b/Framework/Algorithms/test/DetectorEfficiencyCorTest.h
index 7d932a9c0e6b1218c558104af5c933873ada39f3..8558531cd33e17212f7a28334eb7b99344987c86 100644
--- a/Framework/Algorithms/test/DetectorEfficiencyCorTest.h
+++ b/Framework/Algorithms/test/DetectorEfficiencyCorTest.h
@@ -53,7 +53,7 @@ public:
     corrector.setProperty("InputWorkspace", dummyWS);
     corrector.setPropertyValue("OutputWorkspace", "__unused");
 
-    TS_ASSERT_THROWS(corrector.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(corrector.execute(), const std::invalid_argument &);
   }
 
   void testDataWithUngroupedDetectors() {
diff --git a/Framework/Algorithms/test/ExponentialTest.h b/Framework/Algorithms/test/ExponentialTest.h
index 1dc767aa8d0cbff3f0a8f3546fbc1ef337d59110..00579d96b77e9b50be22b4c32e825a1426e9e53b 100644
--- a/Framework/Algorithms/test/ExponentialTest.h
+++ b/Framework/Algorithms/test/ExponentialTest.h
@@ -27,7 +27,7 @@ public:
     TS_ASSERT(alg.isInitialized())
     // Setting properties to input workspaces that don't exist throws
     TS_ASSERT_THROWS(alg.setPropertyValue("InputWorkspace", "test_in21"),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", "test_out2"))
   }
diff --git a/Framework/Algorithms/test/ExtractFFTSpectrumTest.h b/Framework/Algorithms/test/ExtractFFTSpectrumTest.h
index 66bdd6e3f52d989873d12543ae047035c38b6e71..be4ad96dd8ccc5bae5d400af9222f795dbdd0131 100644
--- a/Framework/Algorithms/test/ExtractFFTSpectrumTest.h
+++ b/Framework/Algorithms/test/ExtractFFTSpectrumTest.h
@@ -62,7 +62,7 @@ public:
     alg.initialize();
 
     TS_ASSERT_THROWS(alg.execute(),
-                     std::runtime_error); // check it does output error
+                     const std::runtime_error &); // check it does output error
     TS_ASSERT(!alg.isExecuted());
 
     TS_ASSERT_THROWS_NOTHING(
diff --git a/Framework/Algorithms/test/FFTTest.h b/Framework/Algorithms/test/FFTTest.h
index 8a07e83cde7ea5c212444f812747639aa005991a..85872624394c891812d08634ce16b01bc7e639df 100644
--- a/Framework/Algorithms/test/FFTTest.h
+++ b/Framework/Algorithms/test/FFTTest.h
@@ -469,7 +469,7 @@ public:
     fft->setProperty("InputWorkspace", inputWS);
     fft->setPropertyValue("OutputWorkspace", "__NotUsed");
     fft->setPropertyValue("Real", "0");
-    TS_ASSERT_THROWS(fft->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(fft->execute(), const std::runtime_error &);
   }
 
   // Test that unevenly spaced X values are accepted if the property is set to
@@ -500,7 +500,7 @@ public:
     fft->setProperty("InputWorkspace", inputWS);
     fft->setPropertyValue("OutputWorkspace", "__NotUsed");
     fft->setPropertyValue("Real", "0");
-    TS_ASSERT_THROWS(fft->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(fft->execute(), const std::runtime_error &);
   }
 
   void testRealOutOfRange_Throws() {
@@ -511,7 +511,7 @@ public:
     fft->setProperty("InputWorkspace", inputWS);
     fft->setPropertyValue("OutputWorkspace", "__NotUsed");
     fft->setPropertyValue("Real", "100");
-    TS_ASSERT_THROWS(fft->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(fft->execute(), const std::runtime_error &);
   }
 
   void testImaginaryOutOfRange_Throws() {
@@ -523,7 +523,7 @@ public:
     fft->setPropertyValue("OutputWorkspace", "__NotUsed");
     fft->setPropertyValue("Real", "0");
     fft->setPropertyValue("Imaginary", "100");
-    TS_ASSERT_THROWS(fft->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(fft->execute(), const std::runtime_error &);
   }
 
   void testRealImaginarySizeMismatch_Throws() {
@@ -537,7 +537,7 @@ public:
     fft->setPropertyValue("Real", "0");
     fft->setPropertyValue("Imaginary", "0");
     fft->setProperty("InputImagWorkspace", inImagWS);
-    TS_ASSERT_THROWS(fft->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(fft->execute(), const std::runtime_error &);
   }
 
   /**
diff --git a/Framework/Algorithms/test/FilterByLogValueTest.h b/Framework/Algorithms/test/FilterByLogValueTest.h
index ac2c21df7c78d7d6b46f13bfe94274f41750cf46..659a0d2b4465a193e0bb774a11a860b9d4764274 100644
--- a/Framework/Algorithms/test/FilterByLogValueTest.h
+++ b/Framework/Algorithms/test/FilterByLogValueTest.h
@@ -41,23 +41,23 @@ public:
     TS_ASSERT_THROWS(
         alg.setProperty("InputWorkspace",
                         WorkspaceCreationHelper::create2DWorkspace(1, 1)),
-        std::invalid_argument);
+        const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty(
         "InputWorkspace", WorkspaceCreationHelper::createEventWorkspace()));
 
     // LogName must not be empty
-    TS_ASSERT_THROWS(alg.setProperty("LogName", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("LogName", ""), const std::invalid_argument &);
 
     // TimeTolerance cannot be negative
     TS_ASSERT_THROWS(alg.setProperty("TimeTolerance", -0.1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // ... but it can be zero
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("TimeTolerance", 0.0));
 
     // LogBoundary must be one of "Centre" and "Left"
-    TS_ASSERT_THROWS(alg.setProperty("LogBoundary", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("LogBoundary", ""), const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setProperty("LogBoundary", "Middle"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("LogBoundary", "Left"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("LogBoundary", "Centre"));
   }
diff --git a/Framework/Algorithms/test/FilterByXValueTest.h b/Framework/Algorithms/test/FilterByXValueTest.h
index 06c6c43006339622cb52e92d9a03b389b68749ba..873fe854246dc3bb87c53caac0702492538c9906 100644
--- a/Framework/Algorithms/test/FilterByXValueTest.h
+++ b/Framework/Algorithms/test/FilterByXValueTest.h
@@ -30,7 +30,7 @@ public:
     TS_ASSERT_THROWS(
         alg.setProperty("InputWorkspace",
                         WorkspaceCreationHelper::create2DWorkspace(1, 1)),
-        std::invalid_argument);
+        const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty(
         "InputWorkspace", WorkspaceCreationHelper::createEventWorkspace()));
 
diff --git a/Framework/Algorithms/test/GenerateEventsFilterTest.h b/Framework/Algorithms/test/GenerateEventsFilterTest.h
index 5325e1ffee26505f38674d24482ea1b0ece5e5a9..590be04d14f1188db0e17f4678d0035b962cda9a 100644
--- a/Framework/Algorithms/test/GenerateEventsFilterTest.h
+++ b/Framework/Algorithms/test/GenerateEventsFilterTest.h
@@ -1133,7 +1133,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("UnitOfTime", "Nanoseconds"));
 
     // Running and check this throws
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
     TS_ASSERT(!alg.isExecuted());
 
     // Clean
diff --git a/Framework/Algorithms/test/GetAllEiTest.h b/Framework/Algorithms/test/GetAllEiTest.h
index 131f6619a83ca906917ad84b0425c17e6ac3bb3f..83871ee9b5d9667913c67dad33ab706bcf24b0d6 100644
--- a/Framework/Algorithms/test/GetAllEiTest.h
+++ b/Framework/Algorithms/test/GetAllEiTest.h
@@ -182,7 +182,7 @@ public:
     m_getAllEi.setProperty("OutputWorkspace", "monitor_peaks");
     TSM_ASSERT_THROWS(
         "should throw runtime error on as spectra ID should be positive",
-        m_getAllEi.setProperty("Monitor1SpecID", -1), std::invalid_argument);
+        m_getAllEi.setProperty("Monitor1SpecID", -1), const std::invalid_argument &);
 
     m_getAllEi.setProperty("Monitor1SpecID", 1);
     m_getAllEi.setProperty("Monitor2SpecID", 2);
@@ -193,7 +193,7 @@ public:
 
     TSM_ASSERT_THROWS("should throw runtime error on validation as no "
                       "appropriate logs are defined",
-                      m_getAllEi.execute(), std::runtime_error);
+                      m_getAllEi.execute(), const std::runtime_error &);
     auto log_messages = m_getAllEi.validateInputs();
     TSM_ASSERT_EQUALS("Two logs should fail", log_messages.size(), 2);
     // add invalid property type
@@ -257,7 +257,7 @@ public:
     // Test sort log by run time.
     TSM_ASSERT_THROWS(
         "Attempt to get log without start/stop time set should fail",
-        m_getAllEi.getAvrgLogValue(ws, "ChopperSpeedLog"), std::runtime_error);
+        m_getAllEi.getAvrgLogValue(ws, "ChopperSpeedLog"), const std::runtime_error &);
 
     ws->mutableRun().setStartAndEndTime(Types::Core::DateAndTime(90, 0),
                                         Types::Core::DateAndTime(10000, 0));
@@ -395,7 +395,7 @@ public:
     TSM_ASSERT_THROWS(
         "Should throw out of range",
         m_getAllEi.findGuessOpeningTimes(TOF_range, t0, Period, guess_tof),
-        std::runtime_error);
+        const std::runtime_error &);
 
     t0 = 1;
     guess_tof.resize(0);
diff --git a/Framework/Algorithms/test/GetEiTest.h b/Framework/Algorithms/test/GetEiTest.h
index 54ee6d8df7a4ea3ca6e723ea29779a6d00e8aaf2..b66aade28976e4c5f21caa3dfa79e02b2453eece 100644
--- a/Framework/Algorithms/test/GetEiTest.h
+++ b/Framework/Algorithms/test/GetEiTest.h
@@ -244,7 +244,7 @@ public:
     alg->setProperty("FixEi", false);
     alg->setProperty("EnergyEstimate", 15.0);
     alg->setRethrows(true);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
 
     AnalysisDataService::Instance().remove(outputName);
   }
diff --git a/Framework/Algorithms/test/GetEiV1Test.h b/Framework/Algorithms/test/GetEiV1Test.h
index a684ccdb238993f3e2cb4f141c348b14500e9b8a..c91bd98b2ec659abe61aa57648ab2c5a49ec9c0d 100644
--- a/Framework/Algorithms/test/GetEiV1Test.h
+++ b/Framework/Algorithms/test/GetEiV1Test.h
@@ -152,7 +152,7 @@ public:
     alg->setProperty("Monitor2Spec", 2);
     alg->setProperty("EnergyEstimate", 15.0);
     alg->setRethrows(true);
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
 
     AnalysisDataService::Instance().remove(outputName);
   }
diff --git a/Framework/Algorithms/test/He3TubeEfficiencyTest.h b/Framework/Algorithms/test/He3TubeEfficiencyTest.h
index 4923ea183bfc061b6a7ae23198d8843507815411..fd00f4d52b70d5f8b6e8e7fc3b3eca48b488abdc 100644
--- a/Framework/Algorithms/test/He3TubeEfficiencyTest.h
+++ b/Framework/Algorithms/test/He3TubeEfficiencyTest.h
@@ -27,8 +27,8 @@ using namespace Mantid::DataObjects;
 using namespace Mantid::DataHandling;
 using namespace std;
 using Mantid::HistogramData::BinEdges;
-using Mantid::HistogramData::CountStandardDeviations;
 using Mantid::HistogramData::Counts;
+using Mantid::HistogramData::CountStandardDeviations;
 
 namespace He3TubeEffeciencyHelper {
 void createWorkspace2DInADS(const std::string inputWS) {
@@ -145,11 +145,11 @@ public:
     alg.initialize();
 
     TS_ASSERT_THROWS(alg.setPropertyValue("TubePressure", "-10"),
-                     invalid_argument);
+                     const invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue("TubeThickness", "-0.08"),
-                     invalid_argument);
+                     const invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue("TubeTemperature", "-100"),
-                     invalid_argument);
+                     const invalid_argument &);
 
     AnalysisDataService::Instance().remove(inputWS);
   }
diff --git a/Framework/Algorithms/test/IQTransformTest.h b/Framework/Algorithms/test/IQTransformTest.h
index 4ba95d2ecaa077091770845a99133c5f652fc608..939b1129e71c92b8626242c33e24b36f4ec1bfaa 100644
--- a/Framework/Algorithms/test/IQTransformTest.h
+++ b/Framework/Algorithms/test/IQTransformTest.h
@@ -200,7 +200,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(iq.setPropertyValue("TransformType", "General"));
 
     // Check it fails if constants not set
-    TS_ASSERT_THROWS(iq.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(iq.execute(), const std::invalid_argument &);
 
     std::vector<double> constants(10, 2.0);
     TS_ASSERT_THROWS_NOTHING(
diff --git a/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h b/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h
index 66b308b3b6a3b209bea3e092679fa98c5d030e5a..4709ee0807a60462e4246226dab847c67c4c2cad 100644
--- a/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h
+++ b/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h
@@ -117,7 +117,7 @@ public:
   test_that_createWorkspaceWithTextAxis_throws_when_the_number_of_spectra_is_not_equal_to_the_number_of_labels() {
     auto const labels = std::vector<std::string>({"f0.Width", "f1.EISF"});
     TS_ASSERT_THROWS(createWorkspaceWithTextAxis(6, labels),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
@@ -132,7 +132,7 @@ public:
   test_that_createWorkspaceWithBinValues_throws_when_the_number_of_bins_is_not_equal_to_the_number_of_labels() {
     auto const labels = getNumericAxisLabels();
     TS_ASSERT_THROWS(createWorkspaceWithBinValues(3, labels, 2),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
diff --git a/Framework/Algorithms/test/IntegrationTest.h b/Framework/Algorithms/test/IntegrationTest.h
index f79dc05b8e2a8bbd1328236c0a9dc6af51c77401..c5ba4acf6dcb2b18300e8157b3fbc1b42c9eef36 100644
--- a/Framework/Algorithms/test/IntegrationTest.h
+++ b/Framework/Algorithms/test/IntegrationTest.h
@@ -130,7 +130,7 @@ public:
 
     // Check setting of invalid property value causes failure
     TS_ASSERT_THROWS(alg.setPropertyValue("StartWorkspaceIndex", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(alg.execute());
     TS_ASSERT(alg.isExecuted());
diff --git a/Framework/Algorithms/test/InterpolatingRebinTest.h b/Framework/Algorithms/test/InterpolatingRebinTest.h
index a7ff49055edd8e0349d865b8f25babf17731b9a1..8fa03fc294bec56acc9653b7078501694d452c60 100644
--- a/Framework/Algorithms/test/InterpolatingRebinTest.h
+++ b/Framework/Algorithms/test/InterpolatingRebinTest.h
@@ -34,7 +34,7 @@ public:
     rebin.setPropertyValue("InputWorkspace", "InterpolatingRebinTest_indist");
     rebin.setPropertyValue("OutputWorkspace", "InterpolatingRebinTest_outdist");
     // Check it fails if property not set
-    TS_ASSERT_THROWS(rebin.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(rebin.execute(), const std::runtime_error &)
     TS_ASSERT(!rebin.isExecuted())
 
     // the last bin would are too high to calculate, check it aborts
diff --git a/Framework/Algorithms/test/InterpolationOptionTest.h b/Framework/Algorithms/test/InterpolationOptionTest.h
index a0cab77e1b45812fa586cd7caa696a87ca0bcdf3..9f3b2c77fe7e68117b1f493da6b5fbb3aef5a6ca 100644
--- a/Framework/Algorithms/test/InterpolationOptionTest.h
+++ b/Framework/Algorithms/test/InterpolationOptionTest.h
@@ -87,12 +87,12 @@ public:
   //----------------------------------------------------------------------------
   void test_set_From_String_Throws_With_Unknown_Type() {
     InterpolationOption interpolateOpt;
-    TS_ASSERT_THROWS(interpolateOpt.set("Unknown"), std::invalid_argument);
+    TS_ASSERT_THROWS(interpolateOpt.set("Unknown"), const std::invalid_argument &);
   }
 
   void test_set_From_String_Throws_With_Empty_String() {
     InterpolationOption interpolateOpt;
-    TS_ASSERT_THROWS(interpolateOpt.set(""), std::invalid_argument);
+    TS_ASSERT_THROWS(interpolateOpt.set(""), const std::invalid_argument &);
   }
 
   void test_validateInputSize() {
diff --git a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
index ecf01e9417acc00585b6fb5fa9cca1a39c98be8b..c23ed83a607d67cf16349cc07d36b3dacb84db96 100644
--- a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
+++ b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h
@@ -86,7 +86,7 @@ public:
     const double lambdaBefore(2.5), lambdaAfter(3.5);
     const V3D endPos(0.7, 0.7, 1.4);
     TS_ASSERT_THROWS(mcabs.calculate(rng, endPos, lambdaBefore, lambdaAfter),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 
 private:
diff --git a/Framework/Algorithms/test/MCInteractionVolumeTest.h b/Framework/Algorithms/test/MCInteractionVolumeTest.h
index 72c39644554d0ad7b2e2bdc488c03516d86cd63a..fc78ba3f16ba297bcb78b77274ca5a4d8845c622 100644
--- a/Framework/Algorithms/test/MCInteractionVolumeTest.h
+++ b/Framework/Algorithms/test/MCInteractionVolumeTest.h
@@ -141,7 +141,7 @@ public:
     // nothing
     TS_ASSERT_THROWS(
         MCInteractionVolume mcv(sample, sample.getShape().getBoundingBox()),
-        std::invalid_argument);
+        const std::invalid_argument &);
     // valid shape
     sample.setShape(ComponentCreationHelper::createSphere(1));
     TS_ASSERT_THROWS_NOTHING(
@@ -165,7 +165,7 @@ public:
                                    maxTries);
     TS_ASSERT_THROWS(interactor.calculateAbsorption(rng, startPos, endPos,
                                                     lambdaBefore, lambdaAfter),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Algorithms/test/MagFormFactorCorrectionTest.h b/Framework/Algorithms/test/MagFormFactorCorrectionTest.h
index fd2d673f9236f96c5a8e50385a0803afbb688aa9..0bc701f3e7c3de9acc773c237da93cbb3ee163b8 100644
--- a/Framework/Algorithms/test/MagFormFactorCorrectionTest.h
+++ b/Framework/Algorithms/test/MagFormFactorCorrectionTest.h
@@ -52,7 +52,7 @@ public:
     // Test that no form factor work space is created
     TS_ASSERT_THROWS(
         outws = AnalysisDataService::Instance().retrieve(formFactorWSname),
-        Exception::NotFoundError);
+        const Exception::NotFoundError &);
   }
 
   void testExec() {
diff --git a/Framework/Algorithms/test/MaskBinsTest.h b/Framework/Algorithms/test/MaskBinsTest.h
index 442e46e9da827c14a84582560e11f2395120204a..2c56df79b0a73ba1872619c42a050117e193c896 100644
--- a/Framework/Algorithms/test/MaskBinsTest.h
+++ b/Framework/Algorithms/test/MaskBinsTest.h
@@ -47,7 +47,7 @@ public:
         masker.setPropertyValue("OutputWorkspace", resultWorkspaceName));
 
     // Check that execution fails if XMin & XMax not set
-    TS_ASSERT_THROWS(masker.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(masker.execute(), const std::runtime_error &);
     TS_ASSERT(!masker.isExecuted());
 
     TS_ASSERT_THROWS_NOTHING(masker.setPropertyValue("XMin", "20.0"));
diff --git a/Framework/Algorithms/test/MaskInstrumentTest.h b/Framework/Algorithms/test/MaskInstrumentTest.h
index 2aa6c49aa9c34f36071018652ebddb0915070368..afc48f1e4cdf496187c84ba850c6a9d7f9291db5 100644
--- a/Framework/Algorithms/test/MaskInstrumentTest.h
+++ b/Framework/Algorithms/test/MaskInstrumentTest.h
@@ -119,8 +119,8 @@ public:
 
   void test_out_of_range() {
     const auto in = makeWorkspace();
-    TS_ASSERT_THROWS(maskInstrumentInplace(in, {0}), std::out_of_range);
-    TS_ASSERT_THROWS(maskInstrumentInplace(in, {5}), std::out_of_range);
+    TS_ASSERT_THROWS(maskInstrumentInplace(in, {0}), const std::out_of_range &);
+    TS_ASSERT_THROWS(maskInstrumentInplace(in, {5}), const std::out_of_range &);
   }
 };
 
diff --git a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
index c6ea6fb3e44f3e02a041cddb2eaa507fb45b3f7d..f69916ed458920353c8589ee2b389d7c38a6ba5e 100644
--- a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
+++ b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h
@@ -63,25 +63,25 @@ public:
     // Empty image
     TS_ASSERT_THROWS(
         calculator.iterate(vec, vec, emptyVec, bkg, emptyVec, emptyVec),
-        std::invalid_argument);
+        const std::invalid_argument &);
     // Empty errors
     TS_ASSERT_THROWS(
         calculator.iterate(vec, emptyVec, vec, bkg, emptyVec, emptyVec),
-        std::invalid_argument);
+        const std::invalid_argument &);
     // Empty data
     TS_ASSERT_THROWS(
         calculator.iterate(emptyVec, vec, vec, bkg, emptyVec, emptyVec),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // Bad background (should be positive)
     TS_ASSERT_THROWS(calculator.iterate(vec, vec, vec, 0, emptyVec, emptyVec),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // Size mismatch between data and errors
     std::vector<double> vec2 = {0, 1, 1};
     TS_ASSERT_THROWS(
         calculator.iterate(vec, vec2, vec, bkg, emptyVec, emptyVec),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_size_mismatch_data_image() {
@@ -114,7 +114,7 @@ public:
     EXPECT_CALL(*entropy, secondDerivative(vec2, bkg)).Times(0);
     TS_ASSERT_THROWS(
         calculator.iterate(vec1, vec1, vec2, bkg, emptyVec, emptyVec),
-        std::runtime_error);
+        const std::runtime_error &);
 
     Mock::VerifyAndClearExpectations(entropy);
     Mock::VerifyAndClearExpectations(transform);
@@ -213,7 +213,7 @@ public:
     // But this is not: N * data.size() = image.size()
     TS_ASSERT_THROWS(
         calculator.iterate(vec2, vec2, vec1, bkg, emptyVec, emptyVec),
-        std::runtime_error);
+        const std::runtime_error &);
 
     Mock::VerifyAndClearExpectations(entropy);
     Mock::VerifyAndClearExpectations(transform);
@@ -228,12 +228,12 @@ public:
                          boost::shared_ptr<MockTransform>(transform));
 
     // When data were not loaded public methods should throw an exception
-    TS_ASSERT_THROWS(calculator.getReconstructedData(), std::runtime_error);
-    TS_ASSERT_THROWS(calculator.getImage(), std::runtime_error);
-    TS_ASSERT_THROWS(calculator.getSearchDirections(), std::runtime_error);
-    TS_ASSERT_THROWS(calculator.getQuadraticCoefficients(), std::runtime_error);
-    TS_ASSERT_THROWS(calculator.getAngle(), std::runtime_error);
-    TS_ASSERT_THROWS(calculator.getChisq(), std::runtime_error);
+    TS_ASSERT_THROWS(calculator.getReconstructedData(), const std::runtime_error &);
+    TS_ASSERT_THROWS(calculator.getImage(), const std::runtime_error &);
+    TS_ASSERT_THROWS(calculator.getSearchDirections(), const std::runtime_error &);
+    TS_ASSERT_THROWS(calculator.getQuadraticCoefficients(), const std::runtime_error &);
+    TS_ASSERT_THROWS(calculator.getAngle(), const std::runtime_error &);
+    TS_ASSERT_THROWS(calculator.getChisq(), const std::runtime_error &);
   }
 
   void test_chisq_angle() {
diff --git a/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h b/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h
index 3605fc503cb1efbe144a68fa9eb7ab4fc98b38ac..b6de622c2269ce74707ea6405c463f6bb0c69b53 100644
--- a/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h
+++ b/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h
@@ -65,7 +65,7 @@ public:
     std::vector<double> values = {-1., 0., 1., 2., 3.};
 
     // Odd number of elements, we can't convert to real vector
-    TS_ASSERT_THROWS(space.fromComplex(values), std::invalid_argument);
+    TS_ASSERT_THROWS(space.fromComplex(values), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Algorithms/test/MaxEntTest.h b/Framework/Algorithms/test/MaxEntTest.h
index 2d12e33ea192d31bfd8644b4537ad69f59f7c635..3dd03cec31e4023e6959bd76ce955abb9a5b2d1f 100644
--- a/Framework/Algorithms/test/MaxEntTest.h
+++ b/Framework/Algorithms/test/MaxEntTest.h
@@ -205,7 +205,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_bad_linear_adjustment() {
@@ -224,7 +224,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_bad_const_adjustment() {
@@ -243,7 +243,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_linear_adjustment_with_too_few_spectra() {
@@ -262,7 +262,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_const_adjustment_with_too_few_spectra() {
@@ -281,7 +281,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_adjustments_together_too_few_spectra() {
@@ -305,7 +305,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_adjustments_together_real_data_not_supported() {
@@ -327,7 +327,7 @@ public:
     alg->setPropertyValue("EvolChi", "evolChi");
     alg->setPropertyValue("EvolAngle", "evolAngle");
 
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_adjustment_arithmetic() {
@@ -1058,7 +1058,7 @@ public:
     alg->initialize();
     alg->setChild(true);
     TS_ASSERT_THROWS(alg->setProperty("InputWorkspace", ws),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_histogram_workspace() {
diff --git a/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h b/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h
index a20a399988d3eecf0277bbd28cdf4d64010f79d3..84820b8277dd6d0f1d033ca176cc7383259d5a7b 100644
--- a/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h
+++ b/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h
@@ -199,7 +199,7 @@ public:
 
     TS_ASSERT_THROWS(
         MayersSampleCorrectionStrategy(createTestParameters(), histo),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/MayersSampleCorrectionTest.h b/Framework/Algorithms/test/MayersSampleCorrectionTest.h
index 7461216184c42cf778d3d715fb062e4666531a85..8515a8c867dec2c38983dafde431407e45b82ae5 100644
--- a/Framework/Algorithms/test/MayersSampleCorrectionTest.h
+++ b/Framework/Algorithms/test/MayersSampleCorrectionTest.h
@@ -82,14 +82,14 @@ public:
   void test_Input_Workspace_With_No_Instrument_Throws_Error() {
     auto noInstWS = createTestWorkspaceWithNoInstrument();
 
-    TS_ASSERT_THROWS(runAlgorithm(noInstWS, true), std::invalid_argument);
+    TS_ASSERT_THROWS(runAlgorithm(noInstWS, true), const std::invalid_argument &);
   }
 
   void test_InputWorkspace_With_No_Sample_Shape_Throws_Error() {
     auto noSampleShapeWS = createTestWorkspaceWithNoSampleShape();
 
     TS_ASSERT_THROWS(runAlgorithm(noSampleShapeWS, true),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/MergeRunsTest.h b/Framework/Algorithms/test/MergeRunsTest.h
index aeba7e6944fb65792ddf513ceee4212d82e92432..518d0d2908b3ff463f29e9ae3696297cbe4d5741 100644
--- a/Framework/Algorithms/test/MergeRunsTest.h
+++ b/Framework/Algorithms/test/MergeRunsTest.h
@@ -778,7 +778,7 @@ public:
     MergeRuns merge2;
     TS_ASSERT_THROWS_NOTHING(merge2.initialize());
     TS_ASSERT_THROWS_NOTHING(merge.setPropertyValue("OutputWorkspace", "null"));
-    TS_ASSERT_THROWS(merge2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(merge2.execute(), const std::runtime_error &);
     TS_ASSERT(!merge2.isExecuted());
     MatrixWorkspace_sptr badIn =
         WorkspaceCreationHelper::create2DWorkspace123(3, 10, 1);
@@ -1013,7 +1013,7 @@ public:
     if (noOutput) {
       TS_ASSERT_THROWS(
           AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>("outWS"),
-          Mantid::Kernel::Exception::NotFoundError);
+          const Mantid::Kernel::Exception::NotFoundError &);
       return;
     } else {
       TS_ASSERT_THROWS_NOTHING(
@@ -1230,7 +1230,7 @@ public:
     // should get stuck when trying to get "prop1" as a time series
     TS_ASSERT_THROWS(do_test_mergeSampleLogs(ws, "prop1", mergeType,
                                              "2013-Jun-25 10:59:15  1\n", 2),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_mergeSampleLogs_with_additional_time_series_property() {
diff --git a/Framework/Algorithms/test/ModeratorTzeroLinearTest.h b/Framework/Algorithms/test/ModeratorTzeroLinearTest.h
index c51cbe871a18aada2b4c811cf30fc98f3cb87c45..6ca19113c0533a73b8b968cc360681e6d26e3303 100644
--- a/Framework/Algorithms/test/ModeratorTzeroLinearTest.h
+++ b/Framework/Algorithms/test/ModeratorTzeroLinearTest.h
@@ -84,7 +84,8 @@ public:
     alg.setProperty("OutputWorkspace", "testWS");
     alg.setRethrows(true); // necessary, otherwise the algorithm will catch all
                            // exceptions and not return them
-    TS_ASSERT_THROWS(alg.execute(), Exception::InstrumentDefinitionError);
+    TS_ASSERT_THROWS(alg.execute(),
+                     const Exception::InstrumentDefinitionError &);
     AnalysisDataService::Instance().remove("testWS");
   }
 
@@ -99,7 +100,8 @@ public:
     alg.setProperty("OutputWorkspace", "testWS");
     alg.setRethrows(true); // necessary, otherwise the algorithm will catch all
                            // exceptions and not return them
-    TS_ASSERT_THROWS(alg.execute(), Exception::InstrumentDefinitionError);
+    TS_ASSERT_THROWS(alg.execute(),
+                     const Exception::InstrumentDefinitionError &);
     AnalysisDataService::Instance().remove("testWS");
   }
 
diff --git a/Framework/Algorithms/test/MonteCarloAbsorptionTest.h b/Framework/Algorithms/test/MonteCarloAbsorptionTest.h
index 6efb98cac228dc9f161e4c7c8325fcc8456f5a2c..6154b710edbaa0c8cafe79c3547ad4de7ff96836 100644
--- a/Framework/Algorithms/test/MonteCarloAbsorptionTest.h
+++ b/Framework/Algorithms/test/MonteCarloAbsorptionTest.h
@@ -234,7 +234,7 @@ public:
     auto testWS = WorkspaceCreationHelper::create2DWorkspace(1, 1);
 
     TS_ASSERT_THROWS(mcAbsorb->setProperty("InputWorkspace", testWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Workspace_With_An_Invalid_Sample_Shape_Is_Not_Accepted() {
@@ -247,7 +247,7 @@ public:
         Mantid::Kernel::UnitFactory::Instance().create("Wavelength");
     auto mcabs = createAlgorithm();
     TS_ASSERT_THROWS_NOTHING(mcabs->setProperty("InputWorkspace", testWS));
-    TS_ASSERT_THROWS(mcabs->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(mcabs->execute(), const std::invalid_argument &);
   }
 
   void test_Lower_Limit_for_Number_of_Wavelengths() {
@@ -256,10 +256,10 @@ public:
         1, 10, Environment::SampleOnly, DeltaEMode::Direct, -1, -1};
     int nlambda{1};
     TS_ASSERT_THROWS(runAlgorithm(wsProps, nlambda, "Linear"),
-                     std::runtime_error)
+                     const std::runtime_error &)
     nlambda = 2;
     TS_ASSERT_THROWS(runAlgorithm(wsProps, nlambda, "CSpline"),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 
   void test_event_workspace() {
diff --git a/Framework/Algorithms/test/MultiplyDivideTest.in.h b/Framework/Algorithms/test/MultiplyDivideTest.in.h
index 48c658ccc517362f260fc02e760a0d4db5823aec..e8b088ba772f1fd03794152c4713419b12f35a81 100644
--- a/Framework/Algorithms/test/MultiplyDivideTest.in.h
+++ b/Framework/Algorithms/test/MultiplyDivideTest.in.h
@@ -71,8 +71,8 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg->initialize());
     TS_ASSERT(alg->isInitialized());
     //Setting properties to input workspaces that don't exist throws
-    TS_ASSERT_THROWS( alg->setPropertyValue("LHSWorkspace","test_in21"), std::invalid_argument );
-    TS_ASSERT_THROWS( alg->setPropertyValue("RHSWorkspace","test_in22"), std::invalid_argument );
+    TS_ASSERT_THROWS( alg->setPropertyValue("LHSWorkspace","test_in21"), const std::invalid_argument &);
+    TS_ASSERT_THROWS( alg->setPropertyValue("RHSWorkspace","test_in22"), const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING( alg->setPropertyValue("OutputWorkspace","test_out2") );
     delete alg;
   }
diff --git a/Framework/Algorithms/test/NormaliseByCurrentTest.h b/Framework/Algorithms/test/NormaliseByCurrentTest.h
index 238b3d37119300f0ba4cc550e02f5f1b0784c888..811573871363ea99200cebe77f8a21f33cd35c3c 100644
--- a/Framework/Algorithms/test/NormaliseByCurrentTest.h
+++ b/Framework/Algorithms/test/NormaliseByCurrentTest.h
@@ -162,7 +162,7 @@ public:
       norm.initialize();
 
     // Check it fails if properties haven't been set
-    TS_ASSERT_THROWS(norm.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(norm.execute(), const std::runtime_error &);
     TS_ASSERT(!norm.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/NormaliseByDetectorTest.h b/Framework/Algorithms/test/NormaliseByDetectorTest.h
index 66267aac20ac9f01a87e2f5542fbe123a08c2db2..9273be61497175c5c3001c120b22793215af8ad1 100644
--- a/Framework/Algorithms/test/NormaliseByDetectorTest.h
+++ b/Framework/Algorithms/test/NormaliseByDetectorTest.h
@@ -283,7 +283,7 @@ private:
     alg.initialize();
     alg.setPropertyValue("OutputWorkspace", "out");
     alg.setProperty("InputWorkspace", inputWS);
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
 public:
diff --git a/Framework/Algorithms/test/NormaliseToMonitorTest.h b/Framework/Algorithms/test/NormaliseToMonitorTest.h
index e937733ae95532df121be24305f22b5046d1b579..d6dd8b5c675429291adb03b0488aec4af1e8b8b8 100644
--- a/Framework/Algorithms/test/NormaliseToMonitorTest.h
+++ b/Framework/Algorithms/test/NormaliseToMonitorTest.h
@@ -93,7 +93,7 @@ void dotestExec(bool events, bool sameOutputWS, bool performance = false) {
   if (!norm.isInitialized())
     norm.initialize();
   // Check it fails if properties haven't been set
-  TS_ASSERT_THROWS(norm.execute(), std::runtime_error)
+  TS_ASSERT_THROWS(norm.execute(), const std::runtime_error &)
   TS_ASSERT(!norm.isExecuted())
   TS_ASSERT_THROWS_NOTHING(norm.setPropertyValue("InputWorkspace", "normMon"))
   std::string outputWS("normMon");
diff --git a/Framework/Algorithms/test/PlusMinusTest.in.h b/Framework/Algorithms/test/PlusMinusTest.in.h
index a2511aceacb3f1700c106d2b4d17ed97be513867..2d00aead47e3117e823769feca6c9a0da8ca960b 100644
--- a/Framework/Algorithms/test/PlusMinusTest.in.h
+++ b/Framework/Algorithms/test/PlusMinusTest.in.h
@@ -71,8 +71,8 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg->initialize());
     TS_ASSERT(alg->isInitialized());
     //Setting properties to input workspaces that don't exist throws
-    TS_ASSERT_THROWS( alg->setPropertyValue("LHSWorkspace","test_in21"), std::invalid_argument );
-    TS_ASSERT_THROWS( alg->setPropertyValue("RHSWorkspace","test_in22"), std::invalid_argument );
+    TS_ASSERT_THROWS( alg->setPropertyValue("LHSWorkspace","test_in21"), const std::invalid_argument &);
+    TS_ASSERT_THROWS( alg->setPropertyValue("RHSWorkspace","test_in22"), const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING( alg->setPropertyValue("OutputWorkspace","test_out2") );
     delete alg;
   }
diff --git a/Framework/Algorithms/test/PoissonErrorsTest.h b/Framework/Algorithms/test/PoissonErrorsTest.h
index 2c4612eedef63017dcca8ff80cb8540c33d945b5..13aba22ab69d24e0c9349f01e3a3360f1bb8f0c6 100644
--- a/Framework/Algorithms/test/PoissonErrorsTest.h
+++ b/Framework/Algorithms/test/PoissonErrorsTest.h
@@ -41,9 +41,9 @@ public:
     TS_ASSERT(alg.isInitialized());
     // Setting properties to input workspaces that don't exist throws
     TS_ASSERT_THROWS(alg.setPropertyValue(inputProp1, "test_in21"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue(inputProp2, "test_in22"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue(outputProp, "test_out2"));
   }
 
diff --git a/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h b/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h
index ab1ef6c3eaa58882c051169b736b5d20c3805658..7f58bf7cbb9aa8e6452d88a92f89d42597f44901 100644
--- a/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h
+++ b/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h
@@ -630,7 +630,7 @@ public:
         alg.setPropertyValue("OutputWorkspace", m_outputWSName))
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Efficiencies", effWS))
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Flippers", "0"))
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &)
     TS_ASSERT(!alg.isExecuted())
   }
 
@@ -659,7 +659,7 @@ public:
         alg.setPropertyValue("OutputWorkspace", m_outputWSName))
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Efficiencies", effWS))
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Flippers", "0"))
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &)
     TS_ASSERT(!alg.isExecuted())
   }
 
@@ -692,7 +692,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", m_outputWSName))
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Efficiencies", effWS))
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &)
     TS_ASSERT(!alg.isExecuted())
   }
 
@@ -718,7 +718,7 @@ public:
     TS_ASSERT(alg.isInitialized())
     TS_ASSERT_THROWS(
         alg.setPropertyValue("InputWorkspaces", "ws00, ws01, ws10, ws11"),
-        std::invalid_argument)
+        const std::invalid_argument &)
   }
 
 private:
diff --git a/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h b/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h
index 710bc96eb0dbf66165894e7527b26edd94b987fe..850b945f1bd16807daee74130b9634d88279a2cc 100644
--- a/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h
+++ b/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h
@@ -54,7 +54,7 @@ public:
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     // Error: Input workspaces are missing. Either a workspace group or a list
     // of workspace names must be given
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_input_ws_default_group() {
     PolarizationEfficiencyCor alg;
@@ -103,7 +103,7 @@ public:
     alg.setProperty("CorrectionMethod", "Wildes");
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     // Error: Some invalid Properties found
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
   void test_input_ws_fredrikze_wrong_input_size() {
     PolarizationEfficiencyCor alg;
@@ -114,7 +114,7 @@ public:
     alg.setProperty("CorrectionMethod", "Fredrikze");
     alg.setProperty("Efficiencies", createEfficiencies("Fredrikze"));
     // Error: For PA analysis, input group must have 4 periods
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_input_ws_wildes_list() {
     PolarizationEfficiencyCor alg;
@@ -138,7 +138,7 @@ public:
     alg.setProperty("CorrectionMethod", "Fredrikze");
     alg.setProperty("Efficiencies", createEfficiencies("Fredrikze"));
     // Error: Input workspaces are required to be in a workspace group
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_input_ws_cannot_be_both() {
     PolarizationEfficiencyCor alg;
@@ -150,7 +150,7 @@ public:
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     // Error: Input workspaces must be given either as a workspace group or a
     // list of names
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_input_ws_wildes_wrong_size() {
     PolarizationEfficiencyCor alg;
@@ -161,7 +161,7 @@ public:
     alg.setProperty("CorrectionMethod", "Wildes");
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     // Error: Some invalid Properties found
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_efficiencies_fredrikze_wrong_efficiencies() {
@@ -173,7 +173,7 @@ public:
     alg.setProperty("CorrectionMethod", "Fredrikze");
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     // Error: Efficiencey property not found: Rho;
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_efficiencies_wildes_wrong_efficiencies() {
     PolarizationEfficiencyCor alg;
@@ -184,7 +184,7 @@ public:
     alg.setProperty("CorrectionMethod", "Wildes");
     alg.setProperty("Efficiencies", createEfficiencies("Fredrikze"));
     // Error: Some invalid Properties found
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
   void test_flippers_full() {
     PolarizationEfficiencyCor alg;
@@ -280,7 +280,7 @@ public:
     alg.setProperty("Efficiencies", createEfficiencies("Wildes"));
     alg.setProperty("Flippers", "00, 10, 11");
     // Error: Some invalid Properties found
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
   void test_flippers_wildes_no_pnr() {
     PolarizationEfficiencyCor alg;
@@ -293,7 +293,7 @@ public:
     alg.setProperty("PolarizationAnalysis", "PNR");
     // Error: Property PolarizationAnalysis canot be used with the Wildes
     // method
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_flippers_wildes_no_pa() {
     PolarizationEfficiencyCor alg;
@@ -306,7 +306,7 @@ public:
     alg.setProperty("PolarizationAnalysis", "PA");
     // Error: Property PolarizationAnalysis canot be used with the Wildes
     // method
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_polarization_analysis_pnr() {
     PolarizationEfficiencyCor alg;
@@ -346,7 +346,7 @@ public:
     alg.setProperty("Efficiencies", createEfficiencies("Fredrikze"));
     alg.setProperty("PolarizationAnalysis", "PNR");
     // Error: For PNR analysis, input group must have 2 periods
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
   void test_polarization_analysis_no_flippers() {
     PolarizationEfficiencyCor alg;
@@ -358,7 +358,7 @@ public:
     alg.setProperty("Efficiencies", createEfficiencies("Fredrikze"));
     alg.setProperty("Flippers", "00, 01, 10, 11");
     // Error: Property Flippers canot be used with the Fredrikze method
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_histo() {
diff --git a/Framework/Algorithms/test/PowerTest.h b/Framework/Algorithms/test/PowerTest.h
index c127785599a366d14279a10d8e9035ae97f0978b..205709a2d3349ce4af671a500ed3438d47d3894f 100644
--- a/Framework/Algorithms/test/PowerTest.h
+++ b/Framework/Algorithms/test/PowerTest.h
@@ -83,7 +83,7 @@ public:
     power.initialize();
     TSM_ASSERT_THROWS("Exponent cannot be non-numeric",
                       power.setPropertyValue("Exponent", "x"),
-                      std::invalid_argument)
+                      const std::invalid_argument &)
   }
 
   void testNegativeExponent() {
diff --git a/Framework/Algorithms/test/RadiusSumTest.h b/Framework/Algorithms/test/RadiusSumTest.h
index 2c370dd41b2ba9f46a38912f85ff6ff42f9dbe5d..762305e816c1e6f26b55c4871e160a08557b3b6b 100644
--- a/Framework/Algorithms/test/RadiusSumTest.h
+++ b/Framework/Algorithms/test/RadiusSumTest.h
@@ -38,7 +38,7 @@ public:
     { // check numbins, min and max radius
       auto alg = algInstance();
       // check numbins is only integer > 1
-      TS_ASSERT_THROWS(alg->setProperty("NumBins", -3), std::invalid_argument);
+      TS_ASSERT_THROWS(alg->setProperty("NumBins", -3), const std::invalid_argument &);
       TS_ASSERT_THROWS_NOTHING(alg->setProperty("MinRadius", 1.0));
       TS_ASSERT_THROWS_NOTHING(alg->setProperty("MaxRadius", 0.1));
       MatrixWorkspace_sptr goodWS = RingProfileTest::create_2d_workspace();
@@ -58,11 +58,11 @@ public:
       std::vector<double> justOne(1);
       justOne[0] = -0.35;
       TS_ASSERT_THROWS(alg->setProperty("Centre", justOne),
-                       std::invalid_argument);
+                       const std::invalid_argument &);
 
       std::vector<double> fourInputs(4, -0.45);
       TS_ASSERT_THROWS(alg->setProperty("Centre", fourInputs),
-                       std::invalid_argument);
+                       const std::invalid_argument &);
 
       TS_ASSERT_THROWS_NOTHING(
           alg->setPropertyValue("OutputWorkspace", outWSName));
diff --git a/Framework/Algorithms/test/RebinTest.h b/Framework/Algorithms/test/RebinTest.h
index 44e7ba7f4cc8a1647c93ed113711bf3d1343dbc8..ea59f5d85dd1befc8c42a46653a58cfdfb07007e 100644
--- a/Framework/Algorithms/test/RebinTest.h
+++ b/Framework/Algorithms/test/RebinTest.h
@@ -111,7 +111,7 @@ public:
     rebin.setPropertyValue("InputWorkspace", "test_in1D");
     rebin.setPropertyValue("OutputWorkspace", "test_out");
     // Check it fails if "Params" property not set
-    TS_ASSERT_THROWS(rebin.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(rebin.execute(), const std::runtime_error &);
     TS_ASSERT(!rebin.isExecuted());
     // Now set the property
     rebin.setPropertyValue("Params", "1.5,2.0,20,-0.1,30,1.0,35");
@@ -183,7 +183,7 @@ public:
     rebin.setPropertyValue("InputWorkspace", "test_in1D");
     rebin.setPropertyValue("OutputWorkspace", "test_out");
     // Check it fails if "Params" property not set
-    TS_ASSERT_THROWS(rebin.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(rebin.execute(), const std::runtime_error &);
     TS_ASSERT(!rebin.isExecuted());
     // Now set the property
     rebin.setPropertyValue("Params", "1.0,-1.0,1000.0");
diff --git a/Framework/Algorithms/test/RebinToWorkspaceTest.h b/Framework/Algorithms/test/RebinToWorkspaceTest.h
index 99131041a64b78d16268c48c6a02463d8686a7e6..31b16023e65a74ee63976839a1b196acc24c1013 100644
--- a/Framework/Algorithms/test/RebinToWorkspaceTest.h
+++ b/Framework/Algorithms/test/RebinToWorkspaceTest.h
@@ -55,7 +55,7 @@ public:
       rebinToWS.initialize();
 
     // No properties have been set so should throw if executed
-    TS_ASSERT_THROWS(rebinToWS.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(rebinToWS.execute(), const std::runtime_error &);
 
     // Need to input workspaces to test this
     using namespace Mantid::DataObjects;
diff --git a/Framework/Algorithms/test/ReflectometryReductionOne2Test.h b/Framework/Algorithms/test/ReflectometryReductionOne2Test.h
index 02d462b4f227bb5a7d8606a1f4e17b9f256ee057..eaaad3392e39851fd037b37101ca1d932bfa270e 100644
--- a/Framework/Algorithms/test/ReflectometryReductionOne2Test.h
+++ b/Framework/Algorithms/test/ReflectometryReductionOne2Test.h
@@ -750,7 +750,7 @@ public:
     alg.setPropertyValue("OutputWorkspace", "IvsQ");
     alg.setPropertyValue("OutputWorkspaceWavelength", "IvsLam");
     alg.setProperty("ThetaIn", 22.0);
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_debug_false() {
diff --git a/Framework/Algorithms/test/RegroupTest.h b/Framework/Algorithms/test/RegroupTest.h
index a58ef27bc1f84cbeb3235733d92df7a15b4fdcdf..77dcba2da8ac079263eafa1f85618a7c6f180a72 100644
--- a/Framework/Algorithms/test/RegroupTest.h
+++ b/Framework/Algorithms/test/RegroupTest.h
@@ -38,12 +38,12 @@ public:
     regroup.setPropertyValue("InputWorkspace", "test_in1D");
     regroup.setPropertyValue("OutputWorkspace", "test_out");
     // Check it fails if "params" property not set
-    TS_ASSERT_THROWS(regroup.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(regroup.execute(), const std::runtime_error &)
     TS_ASSERT(!regroup.isExecuted())
     // Trying to set the property with an error fails
     TS_ASSERT_THROWS(
         regroup.setPropertyValue("Params", "1.5,2.0,20,-0.1,15,1.0,35"),
-        std::invalid_argument)
+        const std::invalid_argument &)
     // Now set the property
     TS_ASSERT_THROWS_NOTHING(
         regroup.setPropertyValue("Params", "1.5,1,19,-0.1,30,1,35"))
diff --git a/Framework/Algorithms/test/RemoveBackgroundTest.h b/Framework/Algorithms/test/RemoveBackgroundTest.h
index 3459df6695fd50a70cd15a993a0b5e3267acb199..125aaf49ffad9456c024b15278130fa299bffb81 100644
--- a/Framework/Algorithms/test/RemoveBackgroundTest.h
+++ b/Framework/Algorithms/test/RemoveBackgroundTest.h
@@ -96,12 +96,12 @@ public:
         std::vector<double>(1, 10.));
     TSM_ASSERT_THROWS(
         "Should throw if background workspace is not in TOF units",
-        bgRemoval.initialize(bkgWS, SourceWS, 0), std::invalid_argument);
+        bgRemoval.initialize(bkgWS, SourceWS, 0), const std::invalid_argument &);
 
     bkgWS = WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument(2, 15);
     TSM_ASSERT_THROWS("Should throw if background is not 1 or equal to source",
                       bgRemoval.initialize(bkgWS, SourceWS, 0),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testBackgroundHelper() {
diff --git a/Framework/Algorithms/test/RenameWorkspaceTest.h b/Framework/Algorithms/test/RenameWorkspaceTest.h
index 211c08455a6b1b4535a32140de31c48088a3511f..bbb0cad0cace876963f861e75d4a3284974b8110 100644
--- a/Framework/Algorithms/test/RenameWorkspaceTest.h
+++ b/Framework/Algorithms/test/RenameWorkspaceTest.h
@@ -82,7 +82,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg3.setPropertyValue("OutputWorkspace", "InputWS"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
 
     Workspace_sptr result;
@@ -116,7 +116,7 @@ public:
 
     // Try to rename it should throw exception
     renameAlgorithm.setRethrows(true);
-    TS_ASSERT_THROWS(renameAlgorithm.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(renameAlgorithm.execute(), const std::runtime_error &);
     TS_ASSERT_EQUALS(renameAlgorithm.isExecuted(), false);
 
     TS_ASSERT_THROWS_NOTHING(
@@ -172,11 +172,11 @@ public:
 
     // The old ones should not be in the ADS
     TS_ASSERT_THROWS(ads.retrieve("oldName"),
-                     Mantid::Kernel::Exception::NotFoundError)
+                     const Mantid::Kernel::Exception::NotFoundError &)
     TS_ASSERT_THROWS(ads.retrieve("oldName_1"),
-                     Mantid::Kernel::Exception::NotFoundError)
+                     const Mantid::Kernel::Exception::NotFoundError &)
     TS_ASSERT_THROWS(ads.retrieve("oldName_2"),
-                     Mantid::Kernel::Exception::NotFoundError)
+                     const Mantid::Kernel::Exception::NotFoundError &)
     // The new ones should be
     TS_ASSERT_THROWS_NOTHING(ads.retrieve("newName_1"))
     TS_ASSERT_THROWS_NOTHING(ads.retrieve("newName_1"))
@@ -213,7 +213,7 @@ public:
     AnalysisDataService::Instance().remove("WS_monitors");
     TS_ASSERT_THROWS(
         AnalysisDataService::Instance().retrieveWS<Workspace>("WS_monitors"),
-        Exception::NotFoundError);
+        const Exception::NotFoundError &);
     // monitors resurrected
     alg.setPropertyValue("InputWorkspace", "WS");
     alg.setPropertyValue("OutputWorkspace", "WS1");
diff --git a/Framework/Algorithms/test/RenameWorkspacesTest.h b/Framework/Algorithms/test/RenameWorkspacesTest.h
index 2f6893e28c4e1dc1b03ce7ac9271dd46f32c2804..411a8a7edd52ef6946032e3ca62d26b9ad880fa3 100644
--- a/Framework/Algorithms/test/RenameWorkspacesTest.h
+++ b/Framework/Algorithms/test/RenameWorkspacesTest.h
@@ -161,19 +161,19 @@ public:
     alg6.initialize();
     alg6.setPropertyValue("InputWorkspaces", "InputWS1, InputWS2");
     // Check throw if no workspace name set
-    TS_ASSERT_THROWS(alg6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg6.execute(), const std::runtime_error &);
     // Check throw if conflicting workspace names are set
     alg6.setPropertyValue("WorkspaceNames", "NewName1, NewName2");
     alg6.setPropertyValue("Prefix", "A_");
-    TS_ASSERT_THROWS(alg6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg6.execute(), const std::runtime_error &);
     alg6.setPropertyValue("Suffix", "_1");
-    TS_ASSERT_THROWS(alg6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg6.execute(), const std::runtime_error &);
     alg6.setPropertyValue("Prefix", "");
-    TS_ASSERT_THROWS(alg6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg6.execute(), const std::runtime_error &);
     // Check throw if duplicate workspace names are set
     alg6.setPropertyValue("Suffix", "");
     alg6.setPropertyValue("WorkspaceNames", "NewName3, NewName3");
-    TS_ASSERT_THROWS(alg6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg6.execute(), const std::runtime_error &);
 
     AnalysisDataService::Instance().remove("InputWS7");
     AnalysisDataService::Instance().remove("InputWS8");
@@ -238,7 +238,7 @@ public:
 
     // Try to rename it should throw exception
     renameAlgorithm.setRethrows(true);
-    TS_ASSERT_THROWS(renameAlgorithm.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(renameAlgorithm.execute(), const std::runtime_error &);
     TS_ASSERT_EQUALS(renameAlgorithm.isExecuted(), false);
 
     TS_ASSERT_THROWS_NOTHING(
diff --git a/Framework/Algorithms/test/RingProfileTest.h b/Framework/Algorithms/test/RingProfileTest.h
index a36326247f0f648f0093d27e4b249295a9a73bf8..ce17a91f2de50c230f8e8e4958fdb4b6f22e44d0 100644
--- a/Framework/Algorithms/test/RingProfileTest.h
+++ b/Framework/Algorithms/test/RingProfileTest.h
@@ -33,20 +33,20 @@ public:
     TS_ASSERT(alg.isInitialized());
 
     // check numbins is only integer > 1
-    TS_ASSERT_THROWS(alg.setProperty("NumBins", -3), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("NumBins", -3), const std::invalid_argument &);
     // ange between [-360, 360]
     TS_ASSERT_THROWS(alg.setProperty("StartAngle", 500.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // centre must be 2 or 3 values (x,y) or (x,y,z)
     std::vector<double> justOne(1);
     justOne[0] = -0.35;
     // TS_ASSERT_THROWS(alg.setProperty("Centre",justOne),
-    // std::invalid_argument);
+    // const std::invalid_argument &);
 
     std::vector<double> fourInputs(4, -0.45);
     // TS_ASSERT_THROWS(alg.setProperty("Centre", fourInputs),
-    // std::invalid_argument);
+    // const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", outWSName));
diff --git a/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h b/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h
index 4e0028ec60c5abe37c24e90cc6884c779e2c20b0..cbc4a6bc6030c8775adda0a52cd3101d2f758c66 100644
--- a/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h
+++ b/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h
@@ -241,7 +241,7 @@ public:
         "Should throw an exception since we don't have the requested method "
         "implemneted",
         collimationLengthEstimator.provideCollimationLength(testWorkspace),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_that_missing_guide_cutoff_produces_a_default_value() {
diff --git a/Framework/Algorithms/test/ScaleXTest.h b/Framework/Algorithms/test/ScaleXTest.h
index 7b16940ec57fd0f9ae6bd18c5d602f280edc4ae5..ec692cab66a0fcc8e9d3f25c0aa0dc5cceb4bf1f 100644
--- a/Framework/Algorithms/test/ScaleXTest.h
+++ b/Framework/Algorithms/test/ScaleXTest.h
@@ -250,7 +250,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         scale.setPropertyValue("InstrumentParameter", "factor"));
 
-    TS_ASSERT_THROWS(scale.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(scale.execute(), const std::runtime_error &);
     TS_ASSERT(!scale.isExecuted());
 
     AnalysisDataService::Instance().remove("tomultiply");
@@ -274,7 +274,7 @@ public:
         scale.setPropertyValue("OutputWorkspace", "multiplied"));
     TS_ASSERT_THROWS_NOTHING(scale.setProperty("Combine", true));
 
-    TS_ASSERT_THROWS(scale.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(scale.execute(), const std::invalid_argument &);
     TS_ASSERT(!scale.isExecuted());
 
     AnalysisDataService::Instance().remove("tomultiply");
diff --git a/Framework/Algorithms/test/SmoothDataTest.h b/Framework/Algorithms/test/SmoothDataTest.h
index e71f307cf3bec45b230f4c61c813ad9b08526e3a..42d88fac5eb1801eea4285e7d9bfffe995c25f1f 100644
--- a/Framework/Algorithms/test/SmoothDataTest.h
+++ b/Framework/Algorithms/test/SmoothDataTest.h
@@ -62,10 +62,10 @@ public:
   void testInvalidInputs() {
     SmoothData smooth2;
     TS_ASSERT_THROWS_NOTHING(smooth2.initialize());
-    TS_ASSERT_THROWS(smooth2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(smooth2.execute(), const std::runtime_error &);
     // Can't set Npoints to value less than 3
     TS_ASSERT_THROWS(smooth2.setPropertyValue("NPoints", "1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(
         smooth2.setPropertyValue("InputWorkspace", "noisy"));
diff --git a/Framework/Algorithms/test/SmoothNeighboursTest.h b/Framework/Algorithms/test/SmoothNeighboursTest.h
index 37b3253df7ce899a3656aad1fc1bb4efbd9029cc..baf85df7d2415c3d0e66baa448de83eda9672259 100644
--- a/Framework/Algorithms/test/SmoothNeighboursTest.h
+++ b/Framework/Algorithms/test/SmoothNeighboursTest.h
@@ -245,7 +245,7 @@ public:
    * Start test Radius Filter.
    */
   void testRadiusThrowsIfNegativeCutoff() {
-    TS_ASSERT_THROWS(RadiusFilter(-1), std::invalid_argument);
+    TS_ASSERT_THROWS(RadiusFilter(-1), const std::invalid_argument &);
   }
 
   void testRadiusFiltering() {
@@ -272,7 +272,7 @@ public:
     alg.initialize();
     TSM_ASSERT_THROWS("Cannot have number of neighbours < 1",
                       alg.setProperty("NumberOfNeighbours", -1),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testWithNonIntegerNumberOfNeighbours() {
@@ -280,7 +280,7 @@ public:
     alg.initialize();
     TSM_ASSERT_THROWS("Cannot have non-integer number of neighbours",
                       alg.setProperty("NumberOfNeighbours", 1.1),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testWithValidNumberOfNeighbours() {
diff --git a/Framework/Algorithms/test/SortEventsTest.h b/Framework/Algorithms/test/SortEventsTest.h
index 0ae65be1cb05c8edcaebc1a3cbd2a2a5124fca99..829bf5533db7101b4bde0794637f4a40446c1181 100644
--- a/Framework/Algorithms/test/SortEventsTest.h
+++ b/Framework/Algorithms/test/SortEventsTest.h
@@ -53,7 +53,7 @@ public:
     sort.initialize();
     // Not an event workspace
     TS_ASSERT_THROWS(sort.setPropertyValue("InputWorkspace", "workspace2d"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // This one will be ok
     sort.setPropertyValue("InputWorkspace", wsName);
     sort.setPropertyValue("SortBy", "X Value");
diff --git a/Framework/Algorithms/test/Stitch1DManyTest.h b/Framework/Algorithms/test/Stitch1DManyTest.h
index 56148a5e3453a3177f9990605d5855cf85149611..119a146f58795c5a255ea9c05edf346750e6182d 100644
--- a/Framework/Algorithms/test/Stitch1DManyTest.h
+++ b/Framework/Algorithms/test/Stitch1DManyTest.h
@@ -167,7 +167,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspaces", "ws1"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Params", "0.1, 0.1, 1.8"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("OutputWorkspace", "outws"));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -183,7 +183,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("StartOverlaps", "-0.5, -0.6"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("EndOverlaps", "0.5"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("OutputWorkspace", "outws"));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -198,7 +198,7 @@ public:
     alg.setProperty("StartOverlaps", "-0.5");
     alg.setProperty("EndOverlaps", "0.5, 0.6");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -213,7 +213,7 @@ public:
     alg.setProperty("UseManualScaleFactors", "1");
     alg.setProperty("ManualScaleFactors", "0.5, 0.7");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -228,7 +228,7 @@ public:
     alg.setProperty("InputWorkspaces", "ws1, ws2");
     alg.setProperty("Params", "0.1");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -243,14 +243,14 @@ public:
     alg.setProperty("InputWorkspaces", "group1, ws1");
     alg.setProperty("Params", "0.1");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     Stitch1DMany alg2;
     alg2.setChild(true);
     alg2.initialize();
     alg2.setProperty("InputWorkspaces", "ws1, group1");
     alg2.setProperty("Params", "0.1");
     alg2.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -267,7 +267,7 @@ public:
     alg.setProperty("InputWorkspaces", "group1, group2");
     alg.setProperty("Params", "0.1");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -284,7 +284,7 @@ public:
     alg.setProperty("InputWorkspaces", "group1, group2");
     alg.setProperty("Params", "0.1, 0.1, 2.6");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -309,7 +309,7 @@ public:
     alg.setProperty("Params", "0.1, 0.1, 2.6");
     alg.setProperty("ScaleFactorFromPeriod", 4);
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -589,7 +589,7 @@ public:
     alg.setProperty("StartOverlaps", "0.8");
     alg.setProperty("EndOverlaps", "1.1");
     alg.setProperty("OutputWorkspace", "outws");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     AnalysisDataService::Instance().clear();
   }
 
@@ -1106,7 +1106,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg0.setProperty("UseManualScaleFactors", "1"))
     TS_ASSERT_THROWS_NOTHING(alg0.setProperty("ScaleFactorFromPeriod", 2))
     TS_ASSERT_THROWS_NOTHING(alg0.setProperty("OutputWorkspace", "outws"))
-    TS_ASSERT_THROWS(alg0.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg0.execute(), const std::runtime_error &);
     TS_ASSERT(!alg0.isExecuted())
 
     // Will produce a group outws containing a single workspace named
@@ -1346,7 +1346,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspaces", "ws1, ws2"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("UseManualScaleFactors", "1"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("OutputWorkspace", "ws"));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/Stitch1DTest.h b/Framework/Algorithms/test/Stitch1DTest.h
index c877921861f8cc84bb22df47912108f1515326f9..3adee91c26c7f9ab85109c6d221bf3e41da15f9c 100644
--- a/Framework/Algorithms/test/Stitch1DTest.h
+++ b/Framework/Algorithms/test/Stitch1DTest.h
@@ -419,12 +419,12 @@ public:
     alg.setProperty("LHSWorkspace", make_arbitrary_point_ws());
     alg.setProperty("RHSWorkspace", make_arbitrary_histogram_ws());
     alg.setPropertyValue("OutputWorkspace", "dummy_value");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
 
     alg.setProperty("LHSWorkspace", make_arbitrary_histogram_ws());
     alg.setProperty("RHSWorkspace", make_arbitrary_point_ws());
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/Algorithms/test/SumEventsByLogValueTest.h b/Framework/Algorithms/test/SumEventsByLogValueTest.h
index 7e51c56899d30f216cfe2a06e7339f775a1761d8..e1f9ccffe1fdd367d09f40ce5dde6d42a5c74271 100644
--- a/Framework/Algorithms/test/SumEventsByLogValueTest.h
+++ b/Framework/Algorithms/test/SumEventsByLogValueTest.h
@@ -36,12 +36,12 @@ public:
     TS_ASSERT_THROWS(
         alg.setProperty("InputWorkspace",
                         WorkspaceCreationHelper::create2DWorkspace(1, 1)),
-        std::invalid_argument);
+        const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty(
         "InputWorkspace", WorkspaceCreationHelper::createEventWorkspace()));
 
     // LogName must not be empty
-    TS_ASSERT_THROWS(alg.setProperty("LogName", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("LogName", ""), const std::invalid_argument &);
   }
 
   void test_validateInputs() {
diff --git a/Framework/Algorithms/test/SumRowColumnTest.h b/Framework/Algorithms/test/SumRowColumnTest.h
index 127a41f20b47c8e58f450f5ad5667dacdd38405c..7a2cd8048578518ec65ecfd73a369d3553b993b3 100644
--- a/Framework/Algorithms/test/SumRowColumnTest.h
+++ b/Framework/Algorithms/test/SumRowColumnTest.h
@@ -41,7 +41,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(summer.setPropertyValue("InputWorkspace", inputWS))
     TS_ASSERT_THROWS_NOTHING(summer.setPropertyValue("OutputWorkspace", "nowt"))
 
-    TS_ASSERT_THROWS(summer.execute(), std::runtime_error)
+    TS_ASSERT_THROWS(summer.execute(), const std::runtime_error &)
     TS_ASSERT(!summer.isExecuted())
   }
 
diff --git a/Framework/Algorithms/test/SumSpectraTest.h b/Framework/Algorithms/test/SumSpectraTest.h
index 850d3ef4d9e4d9ece9e3368d9eeb57903130a85e..9b788614fb39d0b4a404da52ca29c360f67f5308 100644
--- a/Framework/Algorithms/test/SumSpectraTest.h
+++ b/Framework/Algorithms/test/SumSpectraTest.h
@@ -202,7 +202,7 @@ public:
 
     // Check setting of invalid property value causes failure
     TS_ASSERT_THROWS(alg2.setPropertyValue("StartWorkspaceIndex", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(alg2.execute());
     TS_ASSERT(alg2.isExecuted());
@@ -270,12 +270,12 @@ public:
   void testExecEvent_going_too_far() {
     TS_ASSERT_THROWS(
         dotestExecEvent("testEvent", "testEvent2", "5,10-15, 500-600"),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testExecEvent_negative_indices() {
     TS_ASSERT_THROWS(dotestExecEvent("testEvent", "testEvent2", "5-10,-10"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void dotestExecEvent(std::string inName, std::string outName,
diff --git a/Framework/Algorithms/test/TransposeTest.h b/Framework/Algorithms/test/TransposeTest.h
index 76a8d6c05dddd2c4199b9fc85c35c1fb0c37a703..90acab2414b529ac86935a0fb888eb907c41f5de 100644
--- a/Framework/Algorithms/test/TransposeTest.h
+++ b/Framework/Algorithms/test/TransposeTest.h
@@ -73,7 +73,7 @@ public:
     const size_t nHist = inputWS->getNumberHistograms();
     const size_t nBins = inputWS->blocksize();
 
-    TS_ASSERT_THROWS(transpose->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(transpose->execute(), const std::runtime_error &);
     TS_ASSERT(!transpose->isExecuted());
 
     TS_ASSERT_THROWS_NOTHING(
diff --git a/Framework/Algorithms/test/UnGroupWorkspaceTest.h b/Framework/Algorithms/test/UnGroupWorkspaceTest.h
index ac652c2107ab51ce96f96274447be4cc7eda291c..d269e91691c3aa30c3bd2077dfeff2e4ce804e9b 100644
--- a/Framework/Algorithms/test/UnGroupWorkspaceTest.h
+++ b/Framework/Algorithms/test/UnGroupWorkspaceTest.h
@@ -97,7 +97,7 @@ public:
     Mantid::Algorithms::UnGroupWorkspace alg;
     alg.initialize();
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", wsName),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     removeFromADS(std::vector<std::string>(1, wsName));
   }
diff --git a/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h b/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h
index c0c79338e1106da1a9a10bf38a2f72c4ddc9eb94..c5c096f497e9121c9c60b907d96262e943074fd9 100644
--- a/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h
+++ b/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h
@@ -214,7 +214,7 @@ public:
     alg.setProperty("WavelengthMin", wavelengthMin);
     alg.setProperty("WavelengthMax", wavelengthMax);
     TSM_ASSERT_THROWS("Negative wavelength cutoffs are not allowed.",
-                      alg.execute(), std::runtime_error);
+                      alg.execute(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/Algorithms/test/WeightingStrategyTest.h b/Framework/Algorithms/test/WeightingStrategyTest.h
index 8411a1452c354e6875d3c859cad722e352176029..cdc4fdda4367dfc7ceaf5be49c3e306499254d32 100644
--- a/Framework/Algorithms/test/WeightingStrategyTest.h
+++ b/Framework/Algorithms/test/WeightingStrategyTest.h
@@ -30,7 +30,7 @@ public:
     NullWeighting strategy;
     V3D distance;
     TSM_ASSERT_THROWS("NullWeighting should always throw in usage",
-                      strategy.weightAt(distance), std::runtime_error);
+                      strategy.weightAt(distance), const std::runtime_error &);
   }
 
   void testNullWeightingStrategyRectangularThrows() {
@@ -41,7 +41,7 @@ public:
     int iy = 0;
     TSM_ASSERT_THROWS("NullWeighting should always throw in usage",
                       strategy.weightAt(adjX, adjY, ix, iy),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   void testFlatWeightingStrategyAtRadius() {
@@ -161,9 +161,9 @@ public:
 
   void testGaussiannDConstructor() {
     TSM_ASSERT_THROWS("GaussianWeighting2D should not allow unsigned cuttoff",
-                      GaussianWeightingnD(-1, 1), std::invalid_argument);
+                      GaussianWeightingnD(-1, 1), const std::invalid_argument &);
     TSM_ASSERT_THROWS("GaussianWeighting2D should not allow unsigned sigma",
-                      GaussianWeightingnD(1, -1), std::invalid_argument);
+                      GaussianWeightingnD(1, -1), const std::invalid_argument &);
     TSM_ASSERT_THROWS_NOTHING("GaussianWeighting2D should have constructed "
                               "with the valid provided arguments",
                               GaussianWeightingnD(1, 1));
diff --git a/Framework/Beamline/test/DetectorInfoTest.h b/Framework/Beamline/test/DetectorInfoTest.h
index 562e00c102a92806a5b68ae5788191f7fdfc7ee0..fbe9209762a3e3c95451ee2e7d86f9c43f4b9d7b 100644
--- a/Framework/Beamline/test/DetectorInfoTest.h
+++ b/Framework/Beamline/test/DetectorInfoTest.h
@@ -51,11 +51,11 @@ public:
     TS_ASSERT_THROWS_NOTHING(DetectorInfo(PosVec(3), RotVec(3), {0, 1, 2}));
     TS_ASSERT_THROWS_NOTHING(DetectorInfo(PosVec(3), RotVec(3), {0, 0, 0}));
     TS_ASSERT_THROWS(DetectorInfo(PosVec(3), RotVec(3), {3}),
-                     std::out_of_range);
+                     const std::out_of_range &);
   }
 
   void test_constructor_length_mismatch() {
-    TS_ASSERT_THROWS(DetectorInfo(PosVec(3), RotVec(2)), std::runtime_error);
+    TS_ASSERT_THROWS(DetectorInfo(PosVec(3), RotVec(2)), const std::runtime_error &);
   }
 
   void test_assign_componentInfo() {
diff --git a/Framework/Catalog/test/ONCatEntityTest.h b/Framework/Catalog/test/ONCatEntityTest.h
index 265cba94f48dce9454713e16963a76aa7f47c75f..ccb2b3dd12b37b14f4fc09e9cb253479eac48fd6 100644
--- a/Framework/Catalog/test/ONCatEntityTest.h
+++ b/Framework/Catalog/test/ONCatEntityTest.h
@@ -77,7 +77,7 @@ public:
     ss << malformedRepresentation;
 
     TS_ASSERT_THROWS(ONCatEntity::fromJSONStream(ss),
-                     MalformedRepresentationError);
+                     const MalformedRepresentationError &);
   }
 
   void test_throws_on_malformed_representation() {
@@ -90,7 +90,7 @@ public:
     ss << missingTypeRepresentation;
 
     TS_ASSERT_THROWS(ONCatEntity::fromJSONStream(ss),
-                     MalformedRepresentationError);
+                     const MalformedRepresentationError &);
   }
 
   void test_nested_values_with_various_types() {
diff --git a/Framework/Catalog/test/ONCatTest.h b/Framework/Catalog/test/ONCatTest.h
index 9de6c40e4e904e3be5ca2ad19140653e3a622577..c79bc84472182f3ebe82ca6c0809e642ef358858 100644
--- a/Framework/Catalog/test/ONCatTest.h
+++ b/Framework/Catalog/test/ONCatTest.h
@@ -77,7 +77,7 @@ public:
     oncat.setInternetHelper(mock_oncat_api);
 
     TS_ASSERT_THROWS(oncat.login("user", "does_not_exist"),
-                     InvalidCredentialsError);
+                     const InvalidCredentialsError &);
     TS_ASSERT(!oncat.isUserLoggedIn());
 
     TS_ASSERT(mock_oncat_api->allResponsesCalledOnce());
@@ -183,7 +183,7 @@ public:
 
     TS_ASSERT_THROWS(
         oncat.refreshTokenIfNeeded(DateAndTime::getCurrentTime() + 3601.0),
-        InvalidRefreshTokenError);
+        const InvalidRefreshTokenError &);
 
     TS_ASSERT(!oncat.isUserLoggedIn());
 
@@ -287,7 +287,7 @@ public:
     oncat.setInternetHelper(mock_oncat_api);
 
     TS_ASSERT_THROWS(oncat.list("api", "instruments", {{"facility", "HFIR"}}),
-                     TokenRejectedError);
+                     const TokenRejectedError &);
     TS_ASSERT(!oncat.isUserLoggedIn());
 
     TS_ASSERT(mock_oncat_api->allResponsesCalledOnce());
diff --git a/Framework/Crystal/test/CalibrationHelpersTest.h b/Framework/Crystal/test/CalibrationHelpersTest.h
index daa58099c4e170146f3f42e9282af9f146e08758..9259d9096b93019e97c195a37d1cbd006d36c7fb 100644
--- a/Framework/Crystal/test/CalibrationHelpersTest.h
+++ b/Framework/Crystal/test/CalibrationHelpersTest.h
@@ -52,7 +52,7 @@ public:
     // Check what happens if l1 is negative
     TS_ASSERT_THROWS(CalibrationHelpers::adjustUpSampleAndSourcePositions(
                          -l1, positionSampleNew, wsNew->mutableComponentInfo()),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     CalibrationHelpers::adjustUpSampleAndSourcePositions(
         l1, positionSampleNew, wsNew->mutableComponentInfo());
diff --git a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h
index 67ee71d71cfd7ad635093c8eab389d46858e2415..afa1a125623fb3ea3db7a0704a099b23ffc92d84 100644
--- a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h
+++ b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h
@@ -34,7 +34,7 @@ public:
     CombinePeaksWorkspaces alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize())
     // Tolerance has to be positive. Even if CombineMatchingPeaks is false!
-    TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), std::invalid_argument)
+    TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), const std::invalid_argument &)
   }
 
   void test_keep_all_peaks() {
diff --git a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h
index e2eec746b67c0969e560245d347026419702501d..6b65a9b18032233cf91a7eb53a7cc0e970035d34 100644
--- a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h
+++ b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h
@@ -34,7 +34,7 @@ public:
     DiffPeaksWorkspaces alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize())
     // Tolerance has to be positive.
-    TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), std::invalid_argument)
+    TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), const std::invalid_argument &)
   }
 
   // It shouldn't be a problem to subtract identical workspaces. You just get an
diff --git a/Framework/Crystal/test/FindSXPeaksHelperTest.h b/Framework/Crystal/test/FindSXPeaksHelperTest.h
index 38da7fdfe5bf9c4873160694c24b858923ba2b92..0615055e5beab64e893b667d6dc10b5b971bbffa 100644
--- a/Framework/Crystal/test/FindSXPeaksHelperTest.h
+++ b/Framework/Crystal/test/FindSXPeaksHelperTest.h
@@ -55,7 +55,7 @@ public:
     std::vector<int> spectra(1, 1);
     TSM_ASSERT_THROWS("SXPeak: Should not construct with a negative intensity",
                       SXPeak(0.001, 0.02, intensity, spectra, 0, spectrumInfo),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   // Test out of bounds construction arguments.
@@ -68,7 +68,7 @@ public:
     TSM_ASSERT_THROWS(
         "SXPeak: Should not construct with a zero size specral list",
         SXPeak(0.001, 0.02, intensity, spectra, 0, spectrumInfo),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testSXPeakGetters() {
@@ -183,7 +183,7 @@ public:
                       "strategy is not AbsoluteBackgroundStrategy",
                       Mantid::Kernel::make_unique<AllPeaksStrategy>(
                           backgroundStrategy.get(), spectrumInfo);
-                      , std::invalid_argument);
+                      , const std::invalid_argument &);
   }
 
   void testThatCanReduceWithSimpleReduceStrategy() {
diff --git a/Framework/Crystal/test/FindSXPeaksTest.h b/Framework/Crystal/test/FindSXPeaksTest.h
index cd0f489ba50a0e0bc8222a3ab65afe01292299fb..c1222d76e8faa360619200d9a0b9101f9b2834d9 100644
--- a/Framework/Crystal/test/FindSXPeaksTest.h
+++ b/Framework/Crystal/test/FindSXPeaksTest.h
@@ -78,7 +78,7 @@ public:
     alg->setProperty("StartWorkspaceIndex", 3);
     alg->setProperty("EndWorkspaceIndex", 2);
     TSM_ASSERT_THROWS("Cannot have start index > end index", alg->execute(),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testFindNoPeaks() {
diff --git a/Framework/Crystal/test/IndexSXPeaksTest.h b/Framework/Crystal/test/IndexSXPeaksTest.h
index e8a0fe617a1acf27810e9a440a375679bdbcf0d8..482e82fe00bb9c073aafc1b6a51c6731607d6e1a 100644
--- a/Framework/Crystal/test/IndexSXPeaksTest.h
+++ b/Framework/Crystal/test/IndexSXPeaksTest.h
@@ -112,13 +112,13 @@ public:
 
   void test_lessThanTwoPeaksThrows() {
     TS_ASSERT_THROWS(doTest(1, "1", 14.131, 19.247, 8.606, 90.0, 105.071, 90.0),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_zeroBasedIndexingThrows() {
     TS_ASSERT_THROWS(
         doTest(1, "0, 1, 2", 14.131, 19.247, 8.606, 90.0, 105.071, 90.0),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_colinearPeaksThrows() {
@@ -134,7 +134,7 @@ public:
 
     TS_ASSERT_THROWS(doTest(6, "1, 2, 3, 4, 5, 6", 14.131, 19.247, 8.606, 90.0,
                             105.071, 90.0),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     // Restore master. peaks workspace.
     m_masterPeaks = temp;
diff --git a/Framework/Crystal/test/PeakStatisticsToolsTest.h b/Framework/Crystal/test/PeakStatisticsToolsTest.h
index 6948369a3ea86987651ea9671a2023ad8c941da8..b5cc0b7b8798061c510e195c279e7cbe1d8e0ecc 100644
--- a/Framework/Crystal/test/PeakStatisticsToolsTest.h
+++ b/Framework/Crystal/test/PeakStatisticsToolsTest.h
@@ -134,8 +134,8 @@ public:
   void test_UniqueReflectionRemoveOutliersSigmaCrit() {
     UniqueReflection reflection(V3D(2, 3, 4));
     TS_ASSERT_THROWS_NOTHING(reflection.removeOutliers(3.0));
-    TS_ASSERT_THROWS(reflection.removeOutliers(0.0), std::invalid_argument);
-    TS_ASSERT_THROWS(reflection.removeOutliers(-10.0), std::invalid_argument);
+    TS_ASSERT_THROWS(reflection.removeOutliers(0.0), const std::invalid_argument &);
+    TS_ASSERT_THROWS(reflection.removeOutliers(-10.0), const std::invalid_argument &);
   }
 
   void test_UniqueReflectionRemoveOutliersFewPeaks() {
diff --git a/Framework/Crystal/test/SetUBTest.h b/Framework/Crystal/test/SetUBTest.h
index adf0470801e946394e2840e328ab0fdab7170f7a..5d81f1a62b6acfb9a845890540ee48fad17616af 100644
--- a/Framework/Crystal/test/SetUBTest.h
+++ b/Framework/Crystal/test/SetUBTest.h
@@ -94,7 +94,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName));
     TS_ASSERT_THROWS(alg.setPropertyValue("UB", "1,1"),
-                     std::invalid_argument); // should fail to initialize UB,
+                     const std::invalid_argument &); // should fail to initialize UB,
                                              // since 9 elements are required
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("UB", "0,0,2,0,4,0,-8,0,0"));
     TS_ASSERT_THROWS_NOTHING(alg.execute(););
@@ -141,7 +141,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName));
     TS_ASSERT_THROWS(alg.setPropertyValue("UB", "1,1"),
-                     std::invalid_argument); // should fail to initialize UB,
+                     const std::invalid_argument &); // should fail to initialize UB,
                                              // since 9 elements are required
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("UB", "1,1,1,1,1,1,1,1,1"));
     TS_ASSERT_THROWS_NOTHING(alg.execute(););
@@ -211,12 +211,12 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName));
     TS_ASSERT_THROWS(alg.setPropertyValue("alpha", "1"),
-                     std::invalid_argument); // should fail to initialize alpha,
+                     const std::invalid_argument &); // should fail to initialize alpha,
                                              // since angle is too small
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("alpha", "90."));
     TS_ASSERT_THROWS(
         alg.setPropertyValue("u", "0,0,2,0,4,0,-8,0,0"),
-        std::invalid_argument); // should fail, only 3 numbers allowed
+        const std::invalid_argument &); // should fail, only 3 numbers allowed
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("u", "0,2,0"));
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("v", "2,0,0"));
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("a", "4"));
diff --git a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h
index 8f5aa245cd5ca09cb735f846b662b76dc46704e7..70bc9cab1f21a06cf6f5f3193e0111682844befb 100644
--- a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h
+++ b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h
@@ -118,9 +118,9 @@ public:
     auto alg = createAlgorithm();
 
     // Zero
-    TS_ASSERT_THROWS(alg->setProperty("Mass", 0.0), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->setProperty("Mass", 0.0), const std::invalid_argument &);
     // Negative
-    TS_ASSERT_THROWS(alg->setProperty("Mass", -0.1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->setProperty("Mass", -0.1), const std::invalid_argument &);
   }
 
   void test_Input_Workspace_Not_In_TOF_Throws_Error() {
@@ -129,7 +129,7 @@ public:
     testWS->getAxis(0)->setUnit("Wavelength");
 
     TS_ASSERT_THROWS(alg->setProperty("InputWorkspace", testWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Input_Workspace_In_TOF_Without_Instrument_Throws_Error() {
@@ -138,7 +138,7 @@ public:
     testWS->getAxis(0)->setUnit("TOF");
 
     TS_ASSERT_THROWS(alg->setProperty("InputWorkspace", testWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -152,7 +152,7 @@ public:
     alg->setProperty("Mass", 1.0097);
     alg->setRethrows(true);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h
index 77b3c816b7384b4caa832750625d48101c368fc6..c77bdd6be4744a77cf540dd919470bdc85f60882 100644
--- a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h
+++ b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h
@@ -64,21 +64,21 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("Function", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_startX_is_not_allowed() {
     ConvolutionFitSequential alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("StartX", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("StartX", ""), const std::invalid_argument &);
   }
 
   void test_empty_endX_is_not_allowed() {
     ConvolutionFitSequential alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
-    TS_ASSERT_THROWS(alg.setPropertyValue("EndX", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setPropertyValue("EndX", ""), const std::invalid_argument &);
   }
 
   void test_empty_specMin_is_not_allowed() {
@@ -86,7 +86,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("SpecMin", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_specMax_is_not_allowed() {
@@ -94,7 +94,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("SpecMax", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_maxIterations_is_not_allowed() {
@@ -102,23 +102,23 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("MaxIterations", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_spectra_min_or_max_number_can_not_be_negative() {
     ConvolutionFitSequential alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(alg.setPropertyValue("SpecMin", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setPropertyValue("SpecMax", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_max_iterations_can_not_be_a_negative_number() {
     ConvolutionFitSequential alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(alg.setPropertyValue("MaxIterations", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_fit_function_that_does_not_contain_resolution_is_not_allowed() {
@@ -126,7 +126,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(
         alg.setProperty("Function", "function=test,name=Convolution"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_fit_function_that_does_not_contain_convolution_is_not_allowed() {
@@ -134,7 +134,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(
         alg.setProperty("Function", "function=test,name=Resolution"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   //------------------------- Execution cases ---------------------------
diff --git a/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h b/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h
index 6e05a3e40001b55e2097922d66fca9d2418444b4..e0aa41d53ec579cb8b0d013f4f00aa4801be7fcb 100644
--- a/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h
+++ b/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h
@@ -48,7 +48,7 @@ public:
     alg.setPropertyValue("Function",
                          "name=UserFunction,Formula=a*x+b,a=1,ties=(b=0)");
     alg.setProperty("InputWorkspace", ws);
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_no_lower_bound() {
@@ -61,7 +61,7 @@ public:
     alg.setPropertyValue(
         "Function", "name=UserFunction,Formula=a*x+b,constraints=(a<4, b<4)");
     alg.setProperty("InputWorkspace", ws);
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_no_upper_bound() {
@@ -74,7 +74,7 @@ public:
     alg.setPropertyValue(
         "Function", "name=UserFunction,Formula=a*x+b,constraints=(a>4, b>4)");
     alg.setProperty("InputWorkspace", ws);
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_all_free() {
diff --git a/Framework/CurveFitting/test/Algorithms/FitTest.h b/Framework/CurveFitting/test/Algorithms/FitTest.h
index a3442a3d15827765945ab2455268d2417f61fca3..4f4f2b92b459629d88ad9cae1542b1dd65065b4e 100644
--- a/Framework/CurveFitting/test/Algorithms/FitTest.h
+++ b/Framework/CurveFitting/test/Algorithms/FitTest.h
@@ -102,14 +102,14 @@ public:
     TS_ASSERT_THROWS(
         alg->setProperty("Function",
                          boost::dynamic_pointer_cast<IFunction>(multi)),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_empty_function_str() {
     auto alg = Mantid::API::AlgorithmManager::Instance().create("Fit");
     alg->initialize();
     TS_ASSERT_THROWS(alg->setPropertyValue("Function", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   // Test that Fit copies minimizer's output properties to Fit
diff --git a/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h b/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h
index 3573807441c80968b3b2ab48e28b155610da6d95..253411f91f040b4c4840094ed8265d2a0630b15c 100644
--- a/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h
+++ b/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h
@@ -53,7 +53,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("Function", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_convolution_fit() {
diff --git a/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h b/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h
index 85624e3ffc18003475bc8001cb787cee746335da..a0ff60d70b3d6b918959c0b25fcf76558f3a7dc7 100644
--- a/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h
+++ b/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h
@@ -55,7 +55,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("Function", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_single_dataset_fit() {
diff --git a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h
index 09ff13fb1400ce112dcbb5d3abefa55e5d7a65d0..3e1710dad3d33c4b18acc29801470833136d1835 100644
--- a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h
+++ b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h
@@ -482,7 +482,7 @@ public:
           mcpars.push_back(parmax);
           mcpars.push_back(parstepsize);
           parametermcs.emplace(parname, mcpars);
-        } catch (runtime_error err) {
+        } catch (const std::runtime_error &err) {
           ;
         }
       }
diff --git a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h
index afd7ac3b728bb9aa02009ffe2040db8d8249d711..b89f0bf5de177f5b1e6b841e3202affef07b88f6 100644
--- a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h
+++ b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h
@@ -61,7 +61,7 @@ public:
     TS_ASSERT_EQUALS(creator.m_matrixWorkspace->getNumberHistograms(), 5);
 
     TS_ASSERT_THROWS(creator.setMatrixWorkspace(MatrixWorkspace_sptr()),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetDomainSize() {
@@ -85,7 +85,7 @@ public:
   void testHistogramIsUsable() {
     TestableSeqDomainSpectrumCreator creator(nullptr, "");
 
-    TS_ASSERT_THROWS(creator.histogramIsUsable(0), std::invalid_argument);
+    TS_ASSERT_THROWS(creator.histogramIsUsable(0), const std::invalid_argument &);
 
     // Workspace with 2 histograms, one of which is masked (No. 0)
     std::set<int64_t> masked;
diff --git a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h
index b0cb4fc02af0abf3cff2d1bc2e468db098f59406..3a61f2724f55312b0c66be02b582a9299e9b2fc7 100644
--- a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h
+++ b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h
@@ -184,7 +184,7 @@ public:
     alg->setRethrows(true);
 
     alg->setProperty("InputWorkspace", createTestWorkspaceWithFoilChanger());
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     TS_ASSERT(!alg->isExecuted());
   }
 
@@ -194,7 +194,7 @@ public:
 
     alg->setProperty("InputWorkspace", createTestWorkspaceWithFoilChanger());
     alg->setPropertyValue("ComptonFunction", "name=Gaussian");
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     TS_ASSERT(!alg->isExecuted());
   }
 
@@ -205,7 +205,7 @@ public:
     alg->setProperty("InputWorkspace", createTestWorkspaceWithFoilChanger());
     alg->setPropertyValue("ComptonFunction",
                           "name=GaussianComptonProfile;name=Gaussian");
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     TS_ASSERT(!alg->isExecuted());
   }
 
diff --git a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h
index c89e2e2db694b51fcbee1635e74478f53d8bdb3f..8e57f384ee984afb4a4d20a416a221362ef3a7dc 100644
--- a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h
+++ b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h
@@ -200,7 +200,7 @@ public:
 
     auto testWS = WorkspaceCreationHelper::create2DWorkspace(1, 1);
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", testWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_setting_workspace_with_no_sample_shape_throws_invalid_argument() {
@@ -210,15 +210,15 @@ public:
     auto testWS = WorkspaceCreationHelper::create2DWorkspace(1, 1);
     testWS->getAxis(0)->setUnit("TOF");
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", testWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_setting_nmasses_zero_or_negative_throws_invalid_argument() {
     VesuvioCalculateMS alg;
     alg.initialize();
 
-    TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", -1), std::invalid_argument);
-    TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", 0), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", -1), const std::invalid_argument &);
+    TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", 0), const std::invalid_argument &);
   }
 
   void test_setting_sampledensity_zero_or_negative_throws_invalid_argument() {
@@ -226,9 +226,9 @@ public:
     alg.initialize();
 
     TS_ASSERT_THROWS(alg.setProperty("SampleDensity", -1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(alg.setProperty("SampleDensity", 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -241,7 +241,7 @@ public:
     alg->setProperty("AtomicProperties",
                      std::vector<double>(sampleProps, sampleProps + 5));
 
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void
@@ -250,14 +250,14 @@ public:
     alg.initialize();
 
     TS_ASSERT_THROWS(alg.setProperty("BeamRadius", -1.5),
-                     std::invalid_argument);
-    TS_ASSERT_THROWS(alg.setProperty("BeamRadius", 0.0), std::invalid_argument);
+                     const std::invalid_argument &);
+    TS_ASSERT_THROWS(alg.setProperty("BeamRadius", 0.0), const std::invalid_argument &);
   }
 
   void test_input_workspace_with_detector_that_has_no_shape_throws_exception() {
     auto alg = createTestAlgorithm(createFlatPlateSampleWS(false));
 
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 };
 class VesuvioCalculateMSTestPerformance : public CxxTest::TestSuite {
diff --git a/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h b/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h
index a87d9c8b22ca7751fd360b4870ce03553fff4f18..627d83ab81ea44cab3480af4ae9981e334ff00c2 100644
--- a/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h
+++ b/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h
@@ -48,12 +48,12 @@ public:
     AugmentedLagrangianOptimizer::ObjFunction userFunc;
     TS_ASSERT_THROWS(
         AugmentedLagrangianOptimizer(nparams, userFunc, equality, inequality),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     equality = DblMatrix(1, nparams - 1); // cols < number parameters
     TS_ASSERT_THROWS(
         AugmentedLagrangianOptimizer(nparams, userFunc, equality, inequality),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void
@@ -68,12 +68,12 @@ public:
     AugmentedLagrangianOptimizer::ObjFunction userFunc;
     TS_ASSERT_THROWS(
         AugmentedLagrangianOptimizer(nparams, userFunc, equality, inequality),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     inequality = DblMatrix(1, nparams - 1); // cols < number parameters
     TS_ASSERT_THROWS(
         AugmentedLagrangianOptimizer(nparams, userFunc, equality, inequality),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_minimizer_calls_user_function() {
diff --git a/Framework/CurveFitting/test/ComplexMatrixTest.h b/Framework/CurveFitting/test/ComplexMatrixTest.h
index 080a5ff945fbf9bf32de7f775d561239c529cd53..6bfe2098169244755a6597bdcc0e867cedd75fa8 100644
--- a/Framework/CurveFitting/test/ComplexMatrixTest.h
+++ b/Framework/CurveFitting/test/ComplexMatrixTest.h
@@ -315,14 +315,14 @@ public:
     m.set(3, 2, 32);
     m.set(3, 3, 33);
 
-    TS_ASSERT_THROWS(ComplexMatrix subm(m, 2, 2, 3, 3), std::runtime_error);
+    TS_ASSERT_THROWS(ComplexMatrix subm(m, 2, 2, 3, 3), const std::runtime_error &);
   }
 
   void test_eigenSystem_rectangular_throw() {
     ComplexMatrix M(3, 4);
     GSLVector v;
     ComplexMatrix Q;
-    TS_ASSERT_THROWS(M.eigenSystemHermitian(v, Q), std::runtime_error);
+    TS_ASSERT_THROWS(M.eigenSystemHermitian(v, Q), const std::runtime_error &);
   }
 
   void test_small_real_eigenSystem() {
diff --git a/Framework/CurveFitting/test/ComplexVectorTest.h b/Framework/CurveFitting/test/ComplexVectorTest.h
index 2aebae920eca9357f6b0cf49142e2739e3b812ce..84ab1932c80e9447fefae18e8636f876fe077066 100644
--- a/Framework/CurveFitting/test/ComplexVectorTest.h
+++ b/Framework/CurveFitting/test/ComplexVectorTest.h
@@ -182,7 +182,7 @@ public:
     TS_ASSERT_DELTA(v1.get(2).real(), 888.0, 1e-10);
     TS_ASSERT_DELTA(v1.get(2).imag(), 0.888, 1e-10);
 
-    TS_ASSERT_THROWS(v1 += makeVector3(), std::runtime_error);
+    TS_ASSERT_THROWS(v1 += makeVector3(), const std::runtime_error &);
   }
 
   void test_minus_operator() {
@@ -195,7 +195,7 @@ public:
     TS_ASSERT_DELTA(v1.get(1).imag(), 0.22, 1e-10);
     TS_ASSERT_DELTA(v1.get(2).real(), 222.0, 1e-10);
     TS_ASSERT_DELTA(v1.get(2).imag(), 0.222, 1e-10);
-    TS_ASSERT_THROWS(v1 -= makeVector3(), std::runtime_error);
+    TS_ASSERT_THROWS(v1 -= makeVector3(), const std::runtime_error &);
   }
 
   void test_times_operator() {
diff --git a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h
index 207cd137df03a9d8cef324b401561328bcb3f61d..420959d6acc277a906ad6b1239d371ad24d3d7d4 100644
--- a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h
+++ b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h
@@ -85,7 +85,7 @@ public:
     BoundaryConstraint bc;
     Expression expr;
     expr.parse("Sigma==20");
-    TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), std::invalid_argument);
+    TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), const std::invalid_argument &);
   }
 
   void testInitialize6() {
@@ -94,7 +94,7 @@ public:
     BoundaryConstraint bc;
     Expression expr;
     expr.parse("a<Sigma<b");
-    TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), std::invalid_argument);
+    TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), const std::invalid_argument &);
   }
 
   // test constructor with lower boundary only
diff --git a/Framework/CurveFitting/test/FitMWTest.h b/Framework/CurveFitting/test/FitMWTest.h
index 7976f82e3574049398df50cba819a9dca9308f4c..8cb556c2c3af450a91654f8d98b8823a78249776 100644
--- a/Framework/CurveFitting/test/FitMWTest.h
+++ b/Framework/CurveFitting/test/FitMWTest.h
@@ -1035,7 +1035,7 @@ public:
     fit.setProperty("Function", "name=FlatBackground");
     fit.setProperty("InputWorkspace", ws);
     TS_ASSERT_THROWS(fit.setProperty("Exclude", exclude),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_exclude_unordered() {
@@ -1048,7 +1048,7 @@ public:
     fit.setProperty("Function", "name=FlatBackground");
     fit.setProperty("InputWorkspace", ws);
     TS_ASSERT_THROWS(fit.setProperty("Exclude", exclude),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_exclude_overlapped() {
diff --git a/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h b/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h
index b58729baeb0a2db328bd7316f2a21abce61579e8..0756494845850ae867226490a1aaca9e1b6adbdc 100644
--- a/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h
+++ b/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h
@@ -288,7 +288,7 @@ public:
     fit.setProperty("Minimizer", "FABADA,ChainLength=5000,StepsBetweenValues="
                                  "10,ConvergenceCriteria = 0.01");
 
-    TS_ASSERT_THROWS(fit.execute(), std::length_error);
+    TS_ASSERT_THROWS(fit.execute(), const std::length_error &);
 
     TS_ASSERT(!fit.isExecuted());
   }
diff --git a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h
index 7c24114819c8cf0ac4e6b4fdd6dd81cd72f9aa4a..6cabd2b9991080c3e02e8aa1724d1c0139297adc 100644
--- a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h
+++ b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h
@@ -39,12 +39,12 @@ public:
 
     TS_ASSERT_EQUALS(creator.m_workspaceIndexIsSet, false);
     TS_ASSERT(!creator.m_matrixWorkspace);
-    TS_ASSERT_THROWS(creator.getDomainSize(), std::invalid_argument);
+    TS_ASSERT_THROWS(creator.getDomainSize(), const std::invalid_argument &);
 
     FunctionDomain_sptr domain;
     FunctionValues_sptr values;
     TS_ASSERT_THROWS(creator.createDomain(domain, values),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testSetWorkspaceIndex() {
@@ -73,19 +73,19 @@ public:
     TestableFunctionDomain1DSpectrumCreator creator;
 
     // throws, because workspace and index are not set.
-    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), std::invalid_argument);
+    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &);
 
     creator.setMatrixWorkspace(
         WorkspaceCreationHelper::create2DWorkspace123(10, 15));
     // still throws, since workspace index has not been set explicitly.
-    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), std::invalid_argument);
+    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &);
 
     creator.setWorkspaceIndex(4);
     TS_ASSERT_THROWS_NOTHING(creator.throwIfWorkspaceInvalid());
 
     creator.setWorkspaceIndex(34);
     // throws also, because index is invalid
-    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), std::invalid_argument);
+    TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &);
   }
 
   void testGetDomainSize() {
diff --git a/Framework/CurveFitting/test/Functions/BSplineTest.h b/Framework/CurveFitting/test/Functions/BSplineTest.h
index 15d86d5ab2ebc3c4dc3fea22f9b8394901531a86..cbf00ef1b483997939343aedc86562d25451b789 100644
--- a/Framework/CurveFitting/test/Functions/BSplineTest.h
+++ b/Framework/CurveFitting/test/Functions/BSplineTest.h
@@ -50,16 +50,16 @@ public:
 
   void test_nonpositive_order() {
     BSpline bsp;
-    TS_ASSERT_THROWS(bsp.setAttributeValue("Order", -3), std::invalid_argument);
-    TS_ASSERT_THROWS(bsp.setAttributeValue("Order", 0), std::invalid_argument);
+    TS_ASSERT_THROWS(bsp.setAttributeValue("Order", -3), const std::invalid_argument &);
+    TS_ASSERT_THROWS(bsp.setAttributeValue("Order", 0), const std::invalid_argument &);
   }
 
   void test_nbreak_too_small() {
     BSpline bsp;
-    TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 1), std::invalid_argument);
-    TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 0), std::invalid_argument);
+    TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 1), const std::invalid_argument &);
+    TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 0), const std::invalid_argument &);
     TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", -3),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_set_uniform_break_points() {
@@ -124,7 +124,7 @@ public:
     inputBreaks[6] = 18.0;
     inputBreaks[7] = 30.0;
     TS_ASSERT_THROWS(bsp.setAttributeValue("BreakPoints", inputBreaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_set_wrong_startx_endx() {
@@ -145,7 +145,7 @@ public:
     FunctionDomain1DVector x(startx, endx, 100);
     FunctionValues y(x);
 
-    TS_ASSERT_THROWS(bsp.function(x, y), std::invalid_argument);
+    TS_ASSERT_THROWS(bsp.function(x, y), const std::invalid_argument &);
 
     startx = 10.0;
     endx = startx;
@@ -159,7 +159,7 @@ public:
     FunctionDomain1DVector x1(startx, endx, 100);
     FunctionValues y1(x1);
 
-    TS_ASSERT_THROWS(bsp.function(x1, y1), std::invalid_argument);
+    TS_ASSERT_THROWS(bsp.function(x1, y1), const std::invalid_argument &);
   }
 
   void test_create_with_function_factory_uniform() {
diff --git a/Framework/CurveFitting/test/Functions/ChebyshevTest.h b/Framework/CurveFitting/test/Functions/ChebyshevTest.h
index 93c2ac39996b0f2325dd5037ae4ddc830333fd63..4a4729fff34e45ea9088f40aa37bde0cb7fb3d9f 100644
--- a/Framework/CurveFitting/test/Functions/ChebyshevTest.h
+++ b/Framework/CurveFitting/test/Functions/ChebyshevTest.h
@@ -41,22 +41,22 @@ public:
     Chebyshev cheb;
     cheb.initialize();
 
-    TS_ASSERT_THROWS(cheb.setAttributeValue("A0", 3.3), std::invalid_argument);
-    TS_ASSERT_THROWS(cheb.setAttributeValue("n", -1), std::invalid_argument);
+    TS_ASSERT_THROWS(cheb.setAttributeValue("A0", 3.3), const std::invalid_argument &);
+    TS_ASSERT_THROWS(cheb.setAttributeValue("n", -1), const std::invalid_argument &);
   }
 
   void testZero() {
     Chebyshev cheb;
     cheb.initialize();
 
-    TS_ASSERT_THROWS(cheb.setAttributeValue("A1", 3.3), std::invalid_argument);
+    TS_ASSERT_THROWS(cheb.setAttributeValue("A1", 3.3), const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(cheb.setAttributeValue("n", 0));
   }
 
   void test_wrongStartEnd() {
     Chebyshev cheb;
     cheb.initialize();
-    TS_ASSERT_THROWS(cheb.getAttribute("AX"), std::invalid_argument);
+    TS_ASSERT_THROWS(cheb.getAttribute("AX"), const std::invalid_argument &);
     TS_ASSERT_EQUALS(cheb.getAttribute("StartX").asDouble(), -1.0);
     TS_ASSERT_EQUALS(cheb.getAttribute("EndX").asDouble(), 1.0);
 
@@ -71,7 +71,7 @@ public:
     FunctionDomain1DVector x(startx, endx, 10);
     FunctionValues y(x);
 
-    TS_ASSERT_THROWS(cheb.function(x, y), std::runtime_error);
+    TS_ASSERT_THROWS(cheb.function(x, y), const std::runtime_error &);
 
     startx = 10.0;
     endx = startx;
@@ -85,7 +85,7 @@ public:
     FunctionDomain1DVector x1(startx, endx, 100);
     FunctionValues y1(x1);
 
-    TS_ASSERT_THROWS(cheb.function(x1, y1), std::runtime_error);
+    TS_ASSERT_THROWS(cheb.function(x1, y1), const std::runtime_error &);
   }
 
   void testValuesWorkspace() {
diff --git a/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h b/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h
index 4ffb5b7142b1bfa4b4657c612dfedabbb51486c6..7b1dc1176cbf0326a3e915a4db7001c5013cd3d2 100644
--- a/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h
+++ b/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h
@@ -37,7 +37,7 @@ public:
     auto countRate = createFunction();
 
     TS_ASSERT_THROWS(countRate->setAttributeValue("IntensityConstraints", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Incorrect_String_For_Intensity_Attribute_Throws_Error() {
@@ -45,7 +45,7 @@ public:
 
     TS_ASSERT_THROWS(
         countRate->setAttributeValue("IntensityConstraints", "Matrix"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_Single_Row_In_Intensity_Attribute_Does_Not_Throw() {
diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h
index afaf054d59de4bc7a403360addb6843bb8d75d2b..156c3bb71b07311b670784c9e30a47fce02aab33 100644
--- a/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h
+++ b/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h
@@ -162,7 +162,7 @@ public:
 
     // error: Vector of FWHMs must either have same size as Temperatures (1)
     // or have size 1. std::runtime_error
-    TS_ASSERT_THROWS(cf.buildSource(), std::runtime_error);
+    TS_ASSERT_THROWS(cf.buildSource(), const std::runtime_error &);
   }
 
   void xtest_build_7() {
diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h
index 7bf47a0ac53b7c46965fb9b9f4725f0210f6bda5..3be7df19929c02421504ced8d4bb1b5c7bbe7684 100644
--- a/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h
+++ b/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h
@@ -419,7 +419,7 @@ public:
     auto alg = AlgorithmFactory::Instance().create("EvaluateFunction", -1);
     alg->initialize();
     TS_ASSERT_THROWS(alg->setPropertyValue("Function", fun),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_underdefinded() {
diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h
index b70905717acb08f34d1dbacf175f5a5e655d8d08..e2d17e8c22cc3b541de1526e93ce64345c6031a1 100644
--- a/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h
+++ b/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h
@@ -114,10 +114,10 @@ public:
     peaks.setAttributeValue("ToleranceIntensity", 0.001 * c_mbsr);
     peaks.setAttributeValue("Ion", "something");
     TS_ASSERT_THROWS(peaks.calculateEigenSystem(en, wf, nre),
-                     std::runtime_error);
+                     const std::runtime_error &);
     peaks.setAttributeValue("Ion", "S2.4");
     TS_ASSERT_THROWS(peaks.calculateEigenSystem(en, wf, nre),
-                     std::runtime_error);
+                     const std::runtime_error &);
     peaks.setAttributeValue("Ion", "S2.5");
     TS_ASSERT_THROWS_NOTHING(peaks.calculateEigenSystem(en, wf, nre));
     TS_ASSERT_EQUALS(nre, -5);
diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h
index ddfc6cdd12693bc3ba32c11bead1d13f0802943b..ae1243187259a3e6b38d7dc7f782a95123da6301 100644
--- a/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h
+++ b/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h
@@ -337,28 +337,28 @@ public:
       std::vector<double> y{1.0, 2.0};
       fun.setAttributeValue("FWHMX", x);
       fun.setAttributeValue("FWHMY", y);
-      TS_ASSERT_THROWS(fun.buildTargetFunction(), std::runtime_error);
+      TS_ASSERT_THROWS(fun.buildTargetFunction(), const std::runtime_error &);
     }
     {
       std::vector<double> x{0.0, 50.0};
       std::vector<double> y{1.0, 2.0, 3.0};
       fun.setAttributeValue("FWHMX", x);
       fun.setAttributeValue("FWHMY", y);
-      TS_ASSERT_THROWS(fun.buildTargetFunction(), std::runtime_error);
+      TS_ASSERT_THROWS(fun.buildTargetFunction(), const std::runtime_error &);
     }
     {
       std::vector<double> x;
       std::vector<double> y{1.0, 2.0};
       fun.setAttributeValue("FWHMX", x);
       fun.setAttributeValue("FWHMY", y);
-      TS_ASSERT_THROWS(fun.buildTargetFunction(), std::runtime_error);
+      TS_ASSERT_THROWS(fun.buildTargetFunction(), const std::runtime_error &);
     }
     {
       std::vector<double> x{0.0, 10.0, 50.0};
       std::vector<double> y;
       fun.setAttributeValue("FWHMX", x);
       fun.setAttributeValue("FWHMY", y);
-      TS_ASSERT_THROWS(fun.buildTargetFunction(), std::runtime_error);
+      TS_ASSERT_THROWS(fun.buildTargetFunction(), const std::runtime_error &);
     }
   }
 
diff --git a/Framework/CurveFitting/test/Functions/CubicSplineTest.h b/Framework/CurveFitting/test/Functions/CubicSplineTest.h
index b520d980d52b745fed2eceb094a6ed51068baee0..5145c4e8afc52df8fca3a9da70459c8b1c966563 100644
--- a/Framework/CurveFitting/test/Functions/CubicSplineTest.h
+++ b/Framework/CurveFitting/test/Functions/CubicSplineTest.h
@@ -61,13 +61,15 @@ public:
     CubicSpline cspline;
 
     // cubic splines must have at least 3 points
-    TS_ASSERT_THROWS(cspline.setAttributeValue("n", 2), std::invalid_argument);
+    TS_ASSERT_THROWS(cspline.setAttributeValue("n", 2),
+                     const std::invalid_argument &);
 
     // set the number of points to something sensible
     cspline.setAttributeValue("n", 5);
 
     // attempt to make it smaller than it already is
-    TS_ASSERT_THROWS(cspline.setAttributeValue("n", 4), std::invalid_argument);
+    TS_ASSERT_THROWS(cspline.setAttributeValue("n", 4),
+                     const std::invalid_argument &);
 
     size_t oldAttrN = cspline.nAttributes();
 
@@ -99,9 +101,9 @@ public:
     CubicSpline cspline;
 
     // check that an invalid index throws errors
-    TS_ASSERT_THROWS(cspline.setXAttribute(4, 0), std::range_error);
+    TS_ASSERT_THROWS(cspline.setXAttribute(4, 0), const std::range_error &);
 
-    TS_ASSERT_THROWS(cspline.setXAttribute(-1, 4), std::range_error);
+    TS_ASSERT_THROWS(cspline.setXAttribute(-1, 4), const std::range_error &);
   }
 
   void testKnownInterpolationValues() {
diff --git a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h
index 5ec97da21a6ca42066f0ec27037ed5fe0aa9455a..8ed1dae82fbf9be6ab8ee8a1e45caf7e4d0997f6 100644
--- a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h
+++ b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h
@@ -40,13 +40,13 @@ public:
   void test_negative() {
     FullprofPolynomial tofbkgd;
     tofbkgd.initialize();
-    TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", -3), std::invalid_argument);
+    TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", -3), const std::invalid_argument &);
   }
 
   void test_zero() {
     FullprofPolynomial tofbkgd;
     tofbkgd.initialize();
-    TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", 0), std::runtime_error);
+    TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", 0), const std::runtime_error &);
   }
 
   void test_calculate() {
diff --git a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h
index dc507ca21781aa4e7c0f6a8bc77dbb262639854c..0af361f36838f35c1007e977213cfa377e269016 100644
--- a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h
+++ b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h
@@ -57,7 +57,7 @@ public:
       TSM_ASSERT_THROWS_NOTHING("Function should have a C_0 parameter",
                                 profile->getParameter("C_0"));
       TSM_ASSERT_THROWS("Function should not have a C_2 parameter",
-                        profile->getParameter("C_2"), std::invalid_argument);
+                        profile->getParameter("C_2"), const std::invalid_argument &);
       TSM_ASSERT_THROWS_NOTHING("Function should have a C_4 parameter",
                                 profile->getParameter("C_4"));
     }
diff --git a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h
index 4bfb3193caa5a8cd9072f8e41a395c13dd0b965a..45203365910204559b9fb0b20a6aa35f0ba4063a 100644
--- a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h
+++ b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h
@@ -43,8 +43,8 @@ public:
     LinearBackground lin;
     lin.initialize();
     // set up fitting function
-    TS_ASSERT_THROWS(lin.setParameter("X", 1.0), std::invalid_argument);
-    TS_ASSERT_THROWS(lin.setParameter("A9", 1.0), std::invalid_argument);
+    TS_ASSERT_THROWS(lin.setParameter("X", 1.0), const std::invalid_argument &);
+    TS_ASSERT_THROWS(lin.setParameter("A9", 1.0), const std::invalid_argument &);
 
     const double a1 = 2;
     const double a0 = 0.3;
diff --git a/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h b/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h
index 4290ca8c6113471cabd11fa7f14f5cbfd63567bf..cf3eaf84cdcb452a1fbfee2215c1b534a340ee96 100644
--- a/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h
+++ b/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h
@@ -114,7 +114,7 @@ public:
 
     // invalid string
     TS_ASSERT_THROWS(fn.setAttributeValue("LatticeSystem", "invalid"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testLatticeSystemConstraintsCubic() {
@@ -128,11 +128,11 @@ public:
     fn.setParameter("a", 3.0);
     TS_ASSERT_EQUALS(fn.getParameter("a"), 3.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("b"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("c"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Alpha"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Beta"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("b"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("c"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Alpha"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Beta"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 3.0, 3.0, 90.0, 90.0, 90.0);
@@ -151,10 +151,10 @@ public:
     fn.setParameter("c", 5.0);
     TS_ASSERT_EQUALS(fn.getParameter("c"), 5.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("b"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Alpha"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Beta"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("b"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Alpha"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Beta"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 3.0, 5.0, 90.0, 90.0, 90.0);
@@ -173,10 +173,10 @@ public:
     fn.setParameter("c", 5.0);
     TS_ASSERT_EQUALS(fn.getParameter("c"), 5.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("b"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Alpha"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Beta"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("b"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Alpha"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Beta"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 3.0, 5.0, 90.0, 90.0, 120.0);
@@ -195,10 +195,10 @@ public:
     fn.setParameter("Alpha", 101.0);
     TS_ASSERT_EQUALS(fn.getParameter("Alpha"), 101.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("b"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("c"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Beta"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("b"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("c"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Beta"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 3.0, 3.0, 101.0, 101.0, 101.0);
@@ -219,9 +219,9 @@ public:
     fn.setParameter("c", 5.0);
     TS_ASSERT_EQUALS(fn.getParameter("c"), 5.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("Alpha"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Beta"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("Alpha"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Beta"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 4.0, 5.0, 90.0, 90.0, 90.0);
@@ -244,8 +244,8 @@ public:
     fn.setParameter("Beta", 101.0);
     TS_ASSERT_EQUALS(fn.getParameter("Beta"), 101.0);
 
-    TS_ASSERT_THROWS(fn.getParameter("Alpha"), std::invalid_argument);
-    TS_ASSERT_THROWS(fn.getParameter("Gamma"), std::invalid_argument);
+    TS_ASSERT_THROWS(fn.getParameter("Alpha"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(fn.getParameter("Gamma"), const std::invalid_argument &);
 
     UnitCell cell = fn.getUnitCellFromParameters();
     cellParametersAre(cell, 3.0, 4.0, 5.0, 90.0, 101.0, 90.0);
@@ -311,10 +311,10 @@ public:
 
     // works only with IPeakFunctions
     TS_ASSERT_THROWS(fn.setAttributeValue("ProfileFunction", "Chebyshev"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS(fn.setAttributeValue("ProfileFunction", "DoesNotExist"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void testPawleyFunctionInitialization() {
diff --git a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h
index aabf2d71216397282845e239f21f560576f6810d..0ec249d4e06987d4ac002032eb13a1e8b737f4d4 100644
--- a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h
+++ b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h
@@ -101,9 +101,9 @@ public:
     FunctionValues values(domain);
     Mantid::CurveFitting::Jacobian jacobian(domain.size(), 3);
 
-    TS_ASSERT_THROWS(fn->function(domain, values), std::invalid_argument);
+    TS_ASSERT_THROWS(fn->function(domain, values), const std::invalid_argument &);
     TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testNoFunctionSet() {
@@ -118,8 +118,8 @@ public:
     FunctionValues values(domain);
     Mantid::CurveFitting::Jacobian jacobian(domain.size(), 3);
 
-    TS_ASSERT_THROWS(fn->function(domain, values), std::runtime_error);
-    TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian), std::runtime_error);
+    TS_ASSERT_THROWS(fn->function(domain, values), const std::runtime_error &);
+    TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian), const std::runtime_error &);
   }
 
   void testBeforeDecoratedFunctionSet() {
@@ -132,7 +132,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(fn->setDecoratedFunction("Gaussian"));
     TS_ASSERT_THROWS(fn->setDecoratedFunction("Chebyshev"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/CurveFitting/test/Functions/PolynomialTest.h b/Framework/CurveFitting/test/Functions/PolynomialTest.h
index 837e3b934bdc7897cef87f854429eca13f5ab57c..c1ceb3789fa393572115c201c834ce855f592faf 100644
--- a/Framework/CurveFitting/test/Functions/PolynomialTest.h
+++ b/Framework/CurveFitting/test/Functions/PolynomialTest.h
@@ -39,13 +39,13 @@ public:
     Polynomial pol;
     pol.initialize();
 
-    TS_ASSERT_THROWS(pol.setParameter("X", 1.0), std::invalid_argument);
+    TS_ASSERT_THROWS(pol.setParameter("X", 1.0), const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(pol.setAttributeValue("n", 3));
-    TS_ASSERT_THROWS(pol.setParameter("A99", 0.0), std::invalid_argument);
+    TS_ASSERT_THROWS(pol.setParameter("A99", 0.0), const std::invalid_argument &);
 
     Polynomial pol2;
     pol2.initialize();
-    TS_ASSERT_THROWS(pol2.setAttributeValue("n", -1), std::invalid_argument);
+    TS_ASSERT_THROWS(pol2.setAttributeValue("n", -1), const std::invalid_argument &);
 
     Polynomial pol3;
     pol3.initialize();
diff --git a/Framework/CurveFitting/test/Functions/QuadraticTest.h b/Framework/CurveFitting/test/Functions/QuadraticTest.h
index fa88536d1a91e0ff56621f66a44f236f34ba9f73..52647767f661c766ff7bb5f27681f5d4df3e33ea 100644
--- a/Framework/CurveFitting/test/Functions/QuadraticTest.h
+++ b/Framework/CurveFitting/test/Functions/QuadraticTest.h
@@ -39,9 +39,9 @@ public:
     Quadratic quad;
     quad.initialize();
 
-    TS_ASSERT_THROWS(quad.setParameter("X", 1.0), std::invalid_argument);
-    TS_ASSERT_THROWS(quad.setAttributeValue("n", 3), std::invalid_argument);
-    TS_ASSERT_THROWS(quad.setParameter("A99", 0.0), std::invalid_argument);
+    TS_ASSERT_THROWS(quad.setParameter("X", 1.0), const std::invalid_argument &);
+    TS_ASSERT_THROWS(quad.setAttributeValue("n", 3), const std::invalid_argument &);
+    TS_ASSERT_THROWS(quad.setParameter("A99", 0.0), const std::invalid_argument &);
   }
 
   void test_calculate() {
diff --git a/Framework/CurveFitting/test/Functions/StretchExpTest.h b/Framework/CurveFitting/test/Functions/StretchExpTest.h
index 09263fe1a82be573df3915df1713845f1163eaf0..fb2f11a21470ab56022927ccab641f7f2b93acbb 100644
--- a/Framework/CurveFitting/test/Functions/StretchExpTest.h
+++ b/Framework/CurveFitting/test/Functions/StretchExpTest.h
@@ -56,7 +56,7 @@ public:
     fn.setParameter("Height", 1.5);
     fn.setParameter("Lifetime", 5.0);
     fn.setParameter("Stretching", 0.4);
-    TS_ASSERT_THROWS(fn.function(x, y), std::runtime_error);
+    TS_ASSERT_THROWS(fn.function(x, y), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h b/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h
index 7cea9892a646ce1e57e65f284e2e433814591ae1..b869fe0a4cf78062e1797013693c1d441984bf46 100644
--- a/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h
+++ b/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h
@@ -186,14 +186,14 @@ public:
     fun.setAttributeValue("WorkspaceIndex", 20);
     FunctionDomain1DVector x(-5.0, 5.0, 83);
     FunctionValues y(x);
-    TS_ASSERT_THROWS(fun.function(x, y), std::range_error);
+    TS_ASSERT_THROWS(fun.function(x, y), const std::range_error &);
     AnalysisDataService::Instance().clear();
   }
 
   void test_loadWorkspaceWhichDoesNotExist() {
     TabulatedFunction fun;
     TS_ASSERT_THROWS(fun.setAttributeValue("Workspace", "SomeWorkspace"),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_Derivatives() {
diff --git a/Framework/CurveFitting/test/GSLMatrixTest.h b/Framework/CurveFitting/test/GSLMatrixTest.h
index 53255227efde91ab13d07f2c64a15895772f95c2..e3fcfc8af24ffb0393945c99bb7ff040658d1412 100644
--- a/Framework/CurveFitting/test/GSLMatrixTest.h
+++ b/Framework/CurveFitting/test/GSLMatrixTest.h
@@ -220,14 +220,14 @@ public:
     m.set(3, 2, 32);
     m.set(3, 3, 33);
 
-    TS_ASSERT_THROWS(GSLMatrix subm(m, 2, 2, 3, 3), std::runtime_error);
+    TS_ASSERT_THROWS(GSLMatrix subm(m, 2, 2, 3, 3), const std::runtime_error &);
   }
 
   void test_eigenSystem_rectangular_throw() {
     GSLMatrix M(3, 4);
     GSLVector v;
     GSLMatrix Q;
-    TS_ASSERT_THROWS(M.eigenSystem(v, Q), std::runtime_error);
+    TS_ASSERT_THROWS(M.eigenSystem(v, Q), const std::runtime_error &);
   }
 
   void test_eigenSystem() {
@@ -382,7 +382,7 @@ public:
     TS_ASSERT_EQUALS(m(2, 1), -3.0);
 
     TS_ASSERT_THROWS(GSLMatrix({{1.0, 2.0}, {4.0, 2.0, 0.0}, {-1.0, -3.0}}),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_vector_mul() {
@@ -401,7 +401,7 @@ public:
     GSLMatrix m({{0.0, 0.0}, {0.0, 0.0}});
     GSLVector b({1.0, 2.0});
     GSLVector x;
-    TS_ASSERT_THROWS(m.solve(b, x), std::runtime_error);
+    TS_ASSERT_THROWS(m.solve(b, x), const std::runtime_error &);
   }
 
   void test_solve_singular_1() {
@@ -409,7 +409,7 @@ public:
     GSLMatrix m({{1.0, 2.0}, {2.0, 4.0}});
     GSLVector b({1.0, 2.0});
     GSLVector x;
-    TS_ASSERT_THROWS(m.solve(b, x), std::runtime_error);
+    TS_ASSERT_THROWS(m.solve(b, x), const std::runtime_error &);
   }
 
   void test_solve() {
diff --git a/Framework/CurveFitting/test/GSLVectorTest.h b/Framework/CurveFitting/test/GSLVectorTest.h
index 4bf7a35957e2fd471534499712576415afc2e2ab..b55bb47c3fc8ccd8cb142fea3c0bd7f528423783 100644
--- a/Framework/CurveFitting/test/GSLVectorTest.h
+++ b/Framework/CurveFitting/test/GSLVectorTest.h
@@ -175,7 +175,7 @@ public:
     TS_ASSERT_EQUALS(v1[1], 88);
     TS_ASSERT_EQUALS(v1[2], 888);
 
-    TS_ASSERT_THROWS(v1 += makeVector3(), std::runtime_error);
+    TS_ASSERT_THROWS(v1 += makeVector3(), const std::runtime_error &);
   }
 
   void test_minus_operator() {
@@ -187,7 +187,7 @@ public:
     TS_ASSERT_EQUALS(v1[1], 22);
     TS_ASSERT_EQUALS(v1[2], 222);
 
-    TS_ASSERT_THROWS(v1 -= makeVector3(), std::runtime_error);
+    TS_ASSERT_THROWS(v1 -= makeVector3(), const std::runtime_error &);
   }
 
   void test_times_operator() {
@@ -212,7 +212,7 @@ public:
     auto v1 = makeVector1();
     auto v2 = makeVector2();
     TS_ASSERT_DELTA(v1.dot(v2), 3.0 * 5.0 + 33.0 * 55.0 + 333.0 * 555.0, 1e-10);
-    TS_ASSERT_THROWS(v1.dot(makeVector3()), std::runtime_error);
+    TS_ASSERT_THROWS(v1.dot(makeVector3()), const std::runtime_error &);
   }
 
   void test_find_min_element() {
diff --git a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h
index 2eebe835c1889b39d9b2ce566a2bf50cb8bb78fb..67490806d4a71c4bb6099e3781ff4251d0a71963 100644
--- a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h
+++ b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h
@@ -69,7 +69,7 @@ public:
     manager.setProperty("InputWorkspace", ws);
     FunctionDomain_sptr domain;
     FunctionValues_sptr values;
-    TS_ASSERT_THROWS(creator.createDomain(domain, values), std::runtime_error);
+    TS_ASSERT_THROWS(creator.createDomain(domain, values), const std::runtime_error &);
   }
 
   void test_domain_values() {
diff --git a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h
index fe7ff4d0100f65fb5b09173ccbd3100e077e2cc4..943a1e2886b173497871779e91e21a55b0fcb443 100644
--- a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h
+++ b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h
@@ -124,7 +124,7 @@ private:
       // for Ikeda-Carpenter it's not allowed to set Fwhm
       try {
         peak->setFwhm(parameters.fwhm);
-      } catch (std::invalid_argument) {
+      } catch (const std::invalid_argument &) {
       }
 
       peak->setHeight(parameters.height);
@@ -132,7 +132,7 @@ private:
       // PeudoVoigt requires an explicit set for mixing parameters
       try {
         peak->setParameter("Mixing", 0.5);
-      } catch (std::invalid_argument) {
+      } catch (const std::invalid_argument &) {
       }
     }
   }
diff --git a/Framework/CurveFitting/test/LatticeDomainCreatorTest.h b/Framework/CurveFitting/test/LatticeDomainCreatorTest.h
index 7a0cb74339aa381ec9c46ef2a930c81ea434121f..d6efd2bb2febe5b9ee93566a4177db419bfffcfe 100644
--- a/Framework/CurveFitting/test/LatticeDomainCreatorTest.h
+++ b/Framework/CurveFitting/test/LatticeDomainCreatorTest.h
@@ -111,10 +111,10 @@ public:
     FunctionValues_sptr values;
 
     TS_ASSERT_THROWS(dc.createDomainFromPeakTable(invalid, domain, values, 0),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     TS_ASSERT_THROWS(dc.createDomainFromPeakTable(empty, domain, values, 0),
-                     std::range_error);
+                     const std::range_error &);
   }
 
   void testCreateDomainPeaksWorkspace() {
diff --git a/Framework/CurveFitting/test/LatticeFunctionTest.h b/Framework/CurveFitting/test/LatticeFunctionTest.h
index 6b9399a3893d6ea947abcae4cf5e36f3ca1e522c..e6114da7c115d257cd883e13a72c9c4dc8df7c87 100644
--- a/Framework/CurveFitting/test/LatticeFunctionTest.h
+++ b/Framework/CurveFitting/test/LatticeFunctionTest.h
@@ -37,7 +37,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(fn.setLatticeSystem("triclinic"));
 
     TS_ASSERT_THROWS(fn.setLatticeSystem("DoesNotExist"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     fn.setLatticeSystem("Cubic");
     // a and ZeroShift
diff --git a/Framework/DataHandling/src/AsciiPointBase.cpp b/Framework/DataHandling/src/AsciiPointBase.cpp
index 0dd0dbda1fe919f343322f3fe0b3e1812276c6c5..b393938bc100e61b275b507518bc2a1e80146faa 100644
--- a/Framework/DataHandling/src/AsciiPointBase.cpp
+++ b/Framework/DataHandling/src/AsciiPointBase.cpp
@@ -72,7 +72,7 @@ void AsciiPointBase::exec() {
     throw std::runtime_error("Cannot treat InputWorkspace");
   try {
     m_length = m_ws->y(0).size();
-  } catch (std::range_error) {
+  } catch (const std::range_error &) {
     g_log.error("InputWorkspace does not contain data");
   }
   extraHeaders(file);
diff --git a/Framework/DataHandling/src/LoadBBY.cpp b/Framework/DataHandling/src/LoadBBY.cpp
index 78af3f5f34838aaf884f8d288430c48f24d383de..fa5f58d4d5d0e6aaebb321763308fa572c5a2d1f 100644
--- a/Framework/DataHandling/src/LoadBBY.cpp
+++ b/Framework/DataHandling/src/LoadBBY.cpp
@@ -308,7 +308,7 @@ void LoadBBY::exec() {
   auto getParam = [&allParams](std::string tag, double defValue) {
     try {
       return std::stod(allParams[tag]);
-    } catch (std::invalid_argument) {
+    } catch (const std::invalid_argument &) {
       return defValue;
     }
   };
@@ -512,7 +512,7 @@ void LoadBBY::loadInstrumentParameters(
                               << hdfTag << ", using default.\n";
           }
 
-        } catch (std::invalid_argument) {
+        } catch (const std::invalid_argument &) {
           g_log.warning() << "Invalid format for BILBY parameter " << x.first
                           << std::endl;
         }
@@ -613,7 +613,7 @@ void LoadBBY::createInstrument(ANSTO::Tar::File &tarFile,
       try {
         logParams["L1_chopper_value"] =
             logParams["Ltof_det_value"] - logParams["L2_det_value"];
-      } catch (std::invalid_argument) {
+      } catch (const std::invalid_argument &) {
         logParams["L1_chopper_value"] = 18.47258984375;
         g_log.warning() << "Cannot find parameter 'L1_chopper_value'"
                         << ", using default.\n";
diff --git a/Framework/DataHandling/src/LoadILLSANS.cpp b/Framework/DataHandling/src/LoadILLSANS.cpp
index 4763862e6f6b9908adf88f3231beec5a7d84b554..434ed8c454b7243966e5fd0929ef9105657004da 100644
--- a/Framework/DataHandling/src/LoadILLSANS.cpp
+++ b/Framework/DataHandling/src/LoadILLSANS.cpp
@@ -316,7 +316,7 @@ void LoadILLSANS::initWorkSpaceD33(NeXus::NXEntry &firstEntry,
                                            channelWidthSum, channelWidthTimes);
       binningUp = getVariableTimeBinning(firstEntry, distancePrefix + "5",
                                          channelWidthSum, channelWidthTimes);
-    } catch (std::runtime_error) {
+    } catch (const std::runtime_error &) {
       vtof = false;
     }
     if (!vtof) {
@@ -632,10 +632,10 @@ void LoadILLSANS::loadMetaData(const NeXus::NXEntry &entry,
     const std::string entryResolution = instrumentNamePath + "/selector/";
     try {
       wavelengthRes = entry.getFloat(entryResolution + "wavelength_res");
-    } catch (std::runtime_error) {
+    } catch (const std::runtime_error &) {
       try {
         wavelengthRes = entry.getFloat(entryResolution + "wave_length_res");
-      } catch (std::runtime_error) {
+      } catch (const std::runtime_error &) {
         g_log.warning("Could not find wavelength resolution, assuming 10%");
       }
     }
diff --git a/Framework/DataHandling/src/LoadMuonNexus1.cpp b/Framework/DataHandling/src/LoadMuonNexus1.cpp
index c7fc6b900a22e6f1aa71e8048e12ee6ae2bb9d00..d70c5fe0253215b9e0d88f4ab910d31a3a0128fc 100644
--- a/Framework/DataHandling/src/LoadMuonNexus1.cpp
+++ b/Framework/DataHandling/src/LoadMuonNexus1.cpp
@@ -671,7 +671,7 @@ void LoadMuonNexus1::loadData(size_t hist, specnum_t &i, specnum_t specNo,
 
   // Create and fill another vector for the X axis
   auto timeChannels = new float[lengthIn + 1]();
-  nxload.getTimeChannels(timeChannels, static_cast<const int>(lengthIn + 1));
+  nxload.getTimeChannels(timeChannels, static_cast<int>(lengthIn + 1));
   // Put the read in array into a vector (inside a shared pointer)
 
   localWorkspace->setHistogram(
diff --git a/Framework/DataHandling/src/LoadNexusLogs.cpp b/Framework/DataHandling/src/LoadNexusLogs.cpp
index 15b7a7fd9358e035c838482c65ecf3d575933200..17a6176c1c9171e1b770b2789cbe1d7f6e9bb64e 100644
--- a/Framework/DataHandling/src/LoadNexusLogs.cpp
+++ b/Framework/DataHandling/src/LoadNexusLogs.cpp
@@ -32,8 +32,8 @@ using API::FileProperty;
 using API::MatrixWorkspace;
 using API::MatrixWorkspace_sptr;
 using API::WorkspaceProperty;
-using Types::Core::DateAndTime;
 using std::size_t;
+using Types::Core::DateAndTime;
 
 // Anonymous namespace
 namespace {
@@ -156,9 +156,9 @@ void appendEndTimeLog(Kernel::Property *prop, const API::Run &run) {
       return;
 
     tsLog->addValue(endTime, tsLog->lastValue());
-  } catch (Exception::NotFoundError) {
+  } catch (const Exception::NotFoundError &) {
     // pass
-  } catch (std::runtime_error) {
+  } catch (const std::runtime_error &) {
     // pass
   }
 }
diff --git a/Framework/DataHandling/test/CompressEventsTest.h b/Framework/DataHandling/test/CompressEventsTest.h
index 64c8568bfb1b09baf39cf1612b9474936a7c9d93..eb1997ec3a392e6c48b1536f8d14f987cb69750f 100644
--- a/Framework/DataHandling/test/CompressEventsTest.h
+++ b/Framework/DataHandling/test/CompressEventsTest.h
@@ -34,7 +34,7 @@ public:
     CompressEvents alg;
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(alg.setPropertyValue("Tolerance", "-1.0"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Tolerance", "0.0"));
   }
 
diff --git a/Framework/DataHandling/test/CreateChopperModelTest.h b/Framework/DataHandling/test/CreateChopperModelTest.h
index 7ac1082b888439bbc9494b77123c5a7c4edcd35a..1faefbeece893aac6feefe9bdfe38f65163c15e5 100644
--- a/Framework/DataHandling/test/CreateChopperModelTest.h
+++ b/Framework/DataHandling/test/CreateChopperModelTest.h
@@ -46,14 +46,14 @@ public:
   void test_ModelType_Is_Not_Valid_By_Default() {
     Mantid::API::IAlgorithm_sptr alg = createAlgorithm(m_inputName);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Algorithm_Throws_If_Chopper_Model_Is_Unknown() {
     Mantid::API::IAlgorithm_sptr alg = createAlgorithm(m_inputName);
 
     TS_ASSERT_THROWS(alg->setPropertyValue("ModelType", "gibberish"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Setting_Parameter_String_Throws_If_It_Is_Empty() {
@@ -61,7 +61,7 @@ public:
         createAlgorithm(m_inputName, "FermiChopperModel");
 
     TS_ASSERT_THROWS(alg->setPropertyValue("Parameters", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/DataHandling/test/CreateModeratorModelTest.h b/Framework/DataHandling/test/CreateModeratorModelTest.h
index f6e7ebf393d9122615024f309e45e6acf836e2fe..172b3e366ccc3488867a6f7f798b704d726b5383 100644
--- a/Framework/DataHandling/test/CreateModeratorModelTest.h
+++ b/Framework/DataHandling/test/CreateModeratorModelTest.h
@@ -46,14 +46,14 @@ public:
   void test_ModelType_Is_Not_Valid_By_Default() {
     IAlgorithm_sptr alg = createAlgorithm(m_inputName);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Algorithm_Throws_If_Moderator_Model_Is_Unknown() {
     IAlgorithm_sptr alg = createAlgorithm(m_inputName);
 
     TS_ASSERT_THROWS(alg->setPropertyValue("ModelType", "gibberish"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Setting_Parameter_String_Throws_If_It_Is_Empty() {
@@ -61,7 +61,7 @@ public:
         createAlgorithm(m_inputName, "IkedaCarpenterModerator");
 
     TS_ASSERT_THROWS(alg->setPropertyValue("Parameters", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h b/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h
index 880b248c31646bdae4a4b1abc27481f4a5df0b00..845f039267c8828ed061f5d2d285d5b55aaa13df 100644
--- a/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h
+++ b/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h
@@ -48,7 +48,7 @@ public:
     alg.initialize();
     alg.setProperty("InputWorkspace", inWS);
     alg.setPropertyValue("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_mixed_input() {
@@ -64,7 +64,7 @@ public:
     alg.setPropertyValue("Ap", "0,1,0,0");
     alg.setPropertyValue("F1", "0,0,1,0");
     alg.setPropertyValue("F2", "0,0,0,1");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_histo() {
diff --git a/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h b/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h
index e217105430ce9d21933e3f455ed1e83d3d98912a..64a86634f7d52a0ee15035d3c54fd0066b9d1170 100644
--- a/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h
+++ b/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h
@@ -50,7 +50,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(
         alg->setPropertyValue("Instrument", "__NOT_AN_INSTRUMENT__"));
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -142,7 +142,7 @@ public:
     alg->initialize();
 
     TS_ASSERT_THROWS(alg->setPropertyValue("UnitX", "NOT_A_UNIT"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_UnitX_Parameter_Is_DeltaE_By_Default() {
diff --git a/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h b/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h
index b7e5087e1d0a8ca0195c2021baa62c21f2f2feea..651ee47b3d821a5cb24cbf16ea110734973aa6a5 100644
--- a/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h
+++ b/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h
@@ -55,7 +55,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_wrong_method() {
@@ -66,7 +66,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_no_lambda() {
@@ -78,7 +78,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_space_sep() {
@@ -132,7 +132,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_non_number() {
@@ -144,7 +144,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_new_line_sep() {
@@ -178,7 +178,7 @@ public:
     alg.setRethrows(true);
     alg.setProperty("InputWorkspace", workspace);
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_Fredrikze() {
diff --git a/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h b/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h
index 7520e65258e724c2441a2b79b0f3df2efb340fbb..99d7f8a9dc51bf9ee2d01d4205cf0e6bbe79b60c 100644
--- a/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h
+++ b/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h
@@ -44,7 +44,7 @@ public:
     filteralg.initialize();
     TS_ASSERT_THROWS(filteralg.setProperty(
                          "EventFilename", "this_file_doesnt_exist.blabla.data"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_setProperty() {
diff --git a/Framework/DataHandling/test/GroupDetectors2Test.h b/Framework/DataHandling/test/GroupDetectors2Test.h
index e21a3322a72a05a9879126399d4f7b231679bdc7..35169f94ad334fae888514c1c3a8750d19b6de6a 100644
--- a/Framework/DataHandling/test/GroupDetectors2Test.h
+++ b/Framework/DataHandling/test/GroupDetectors2Test.h
@@ -938,7 +938,7 @@ public:
     // Check that the GroupingPattern was recognised as invalid
     TS_ASSERT(!groupAlg.validateInputs()["GroupingPattern"].empty());
     // And that we're not allowed to run
-    TS_ASSERT_THROWS(groupAlg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(groupAlg.execute(), const std::runtime_error &);
   }
 
   void test_grouping_with_time_indexes() {
diff --git a/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h b/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h
index f132d04b0c057c45212b0f10a2fca81c5c5a80e6..a3348a991d88efff42d01010cc224dce17983b8d 100644
--- a/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h
+++ b/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h
@@ -53,7 +53,7 @@ public:
     alg.setRethrows(true);
     alg.setPropertyValue("OutputWorkspace", "dummy");
     // Error: At least one of the efficiency file names must be set.
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_mixed_input() {
@@ -72,7 +72,7 @@ public:
     alg.setProperty("P2", ws4);
     alg.setPropertyValue("OutputWorkspace", "dummy");
     // Error: Efficiencies belonging to different methods cannot mix.
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_fredrikze() {
@@ -349,7 +349,7 @@ public:
     alg.setProperty("F2", ws4);
     alg.setPropertyValue("OutputWorkspace", "dummy");
     // Error: Cannot mix histograms and point data.
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
   void test_ragged() {
diff --git a/Framework/DataHandling/test/LoadBBYTest.h b/Framework/DataHandling/test/LoadBBYTest.h
index eee09a3b9032c696f54b57f6ce50c46207212038..f5e04d40e1d166c54aaa29dd52a11c6fbc4c4a37 100644
--- a/Framework/DataHandling/test/LoadBBYTest.h
+++ b/Framework/DataHandling/test/LoadBBYTest.h
@@ -45,7 +45,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // should succeed now
     std::string inputFile = "BBY0000014.tar";
diff --git a/Framework/DataHandling/test/LoadCanSAS1dTest.h b/Framework/DataHandling/test/LoadCanSAS1dTest.h
index e086146ea88ca0a149c199c36758ac0e782672e1..0597730ec9636f83233cbefa48541681628ad33f 100644
--- a/Framework/DataHandling/test/LoadCanSAS1dTest.h
+++ b/Framework/DataHandling/test/LoadCanSAS1dTest.h
@@ -32,7 +32,7 @@ public:
       cansas1d.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(cansas1d.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(cansas1d.execute(), const std::runtime_error &);
 
     // Set the file name
     cansas1d.setPropertyValue("Filename", inputFile);
diff --git a/Framework/DataHandling/test/LoadDetectorInfoTest.h b/Framework/DataHandling/test/LoadDetectorInfoTest.h
index fa22d07192c7defe8a726b150d51eb0204cfb203..d14fd686e4f0b3278d6b327967d8de90f5acd108 100644
--- a/Framework/DataHandling/test/LoadDetectorInfoTest.h
+++ b/Framework/DataHandling/test/LoadDetectorInfoTest.h
@@ -275,7 +275,7 @@ public:
     makeTestWorkspace(SmallTestDatFile::NDETECTS, NBINS, m_InoutWS);
     loadDetInfo.setPropertyValue("Workspace", m_InoutWS);
     loadDetInfo.setPropertyValue("DataFilename", "argus0026287.nxs");
-    TS_ASSERT_THROWS(loadDetInfo.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(loadDetInfo.execute(), const std::invalid_argument &);
 
     AnalysisDataService::Instance().remove(m_InoutWS);
   }
diff --git a/Framework/DataHandling/test/LoadEMUauTest.h b/Framework/DataHandling/test/LoadEMUauTest.h
index 78d7661a5bffc91b5344b0d1d311048df2691fd0..86c16e69bec8e0ca14b516f1bad5d0874da8e4c4 100644
--- a/Framework/DataHandling/test/LoadEMUauTest.h
+++ b/Framework/DataHandling/test/LoadEMUauTest.h
@@ -45,7 +45,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // should succeed now
     std::string inputFile = "EMU0006330.tar";
diff --git a/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h b/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h
index d9c39d2076a8878348dd18b34da71e749721a161..89b791b43a137e082ae23a50c64288b9e049567a 100644
--- a/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h
+++ b/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h
@@ -73,27 +73,27 @@ public:
   void test_makeIndexInfo_min_out_of_range() {
     for (const auto min : {0, 3, 13}) {
       LoadEventNexusIndexSetup indexSetup(m_ws, min, EMPTY_INT(), {});
-      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), std::out_of_range);
+      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), const std::out_of_range &);
     }
   }
 
   void test_makeIndexInfo_max_out_of_range() {
     for (const auto max : {0, 3, 13}) {
       LoadEventNexusIndexSetup indexSetup(m_ws, EMPTY_INT(), max, {});
-      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), std::out_of_range);
+      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), const std::out_of_range &);
     }
   }
 
   void test_makeIndexInfo_range_out_of_range() {
     for (const auto i : {0, 3, 13}) {
       LoadEventNexusIndexSetup indexSetup(m_ws, EMPTY_INT(), EMPTY_INT(), {i});
-      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), std::out_of_range);
+      TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), const std::out_of_range &);
     }
   }
 
   void test_makeIndexInfo_range_includes_monitor() {
     LoadEventNexusIndexSetup indexSetup(m_ws, EMPTY_INT(), EMPTY_INT(), {666});
-    TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), std::out_of_range);
+    TS_ASSERT_THROWS(indexSetup.makeIndexInfo(), const std::out_of_range &);
   }
 
   void test_makeIndexInfo_min() {
@@ -335,7 +335,7 @@ public:
     auto spec = {1};
     auto udet = {666};
     TS_ASSERT_THROWS(indexSetup.makeIndexInfo({spec, udet}, false),
-                     std::out_of_range);
+                     const std::out_of_range &);
   }
 
   void test_makeIndexInfo_from_isis_spec_udet_monitors() {
diff --git a/Framework/DataHandling/test/LoadEventNexusTest.h b/Framework/DataHandling/test/LoadEventNexusTest.h
index 2d83e6f3a5335a9c17b812b0fda50a78d335dfd1..fca76fd3906c5ab9769eb923d50392bf9e876e20 100644
--- a/Framework/DataHandling/test/LoadEventNexusTest.h
+++ b/Framework/DataHandling/test/LoadEventNexusTest.h
@@ -349,7 +349,7 @@ public:
 
     // Test that asking not to load the logs did what it should
     // Make sure that we throw if we try to read a log (that shouldn't be there)
-    TS_ASSERT_THROWS(WS->getLog("proton_charge"), std::invalid_argument);
+    TS_ASSERT_THROWS(WS->getLog("proton_charge"), const std::invalid_argument &);
 
     //----- Now we re-load with precounting and compare memory use ----
     LoadEventNexus ld2;
diff --git a/Framework/DataHandling/test/LoadEventPreNexus2Test.h b/Framework/DataHandling/test/LoadEventPreNexus2Test.h
index 6c347bf20904b7b2855c5a7aac4b1244bdf6aeda..30f8d8c70ea678c79ab89835429faa693f7240df 100644
--- a/Framework/DataHandling/test/LoadEventPreNexus2Test.h
+++ b/Framework/DataHandling/test/LoadEventPreNexus2Test.h
@@ -66,9 +66,9 @@ public:
   void test_file_not_found() {
     TS_ASSERT_THROWS(eventLoader->setPropertyValue(
                          "EventFilename", "this_file_doesnt_exist.blabla.data"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Execute fails since the properties aren't set correctly.
-    TS_ASSERT_THROWS(eventLoader->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(eventLoader->execute(), const std::runtime_error &);
   }
 
   void test_data_sizes() {
@@ -267,7 +267,7 @@ public:
                                   "CNCS_7860_neutron_event.dat");
     eventLoader->setPropertyValue("ChunkNumber", "3");
     eventLoader->setPropertyValue("TotalChunks", "2");
-    TS_ASSERT_THROWS(eventLoader->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(eventLoader->execute(), const std::runtime_error &);
   }
 
   void test_loading_chunks() {
diff --git a/Framework/DataHandling/test/LoadFITSTest.h b/Framework/DataHandling/test/LoadFITSTest.h
index ee560e15022c0c4e2d09e75eea9e19e7da846ddf..f4ead90ee3edeed4324ee14015a76654b707a88f 100644
--- a/Framework/DataHandling/test/LoadFITSTest.h
+++ b/Framework/DataHandling/test/LoadFITSTest.h
@@ -77,14 +77,14 @@ public:
     LoadFITS lf;
     TS_ASSERT_THROWS_NOTHING(lf.initialize());
     TS_ASSERT_THROWS_NOTHING(lf.setPropertyValue("Filename", g_smallFname1));
-    TS_ASSERT_THROWS(lf.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(lf.execute(), const std::runtime_error &);
     TS_ASSERT(!lf.isExecuted());
 
     LoadFITS lf2;
     TS_ASSERT_THROWS_NOTHING(lf2.initialize());
     TS_ASSERT_THROWS_NOTHING(
         lf2.setPropertyValue("OutputWorkspace", "out_ws_name"));
-    TS_ASSERT_THROWS(lf2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(lf2.execute(), const std::runtime_error &);
     TS_ASSERT(!lf2.isExecuted());
   }
 
@@ -92,28 +92,28 @@ public:
     LoadFITS lf;
     TS_ASSERT_THROWS_NOTHING(lf.initialize());
     TS_ASSERT_THROWS(lf.setPropertyValue("file", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(lf.setPropertyValue("output", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(lf.setPropertyValue("FITS", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     TS_ASSERT_THROWS(lf.setPropertyValue("BinSize", "-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(lf.setPropertyValue("BinSize", "0"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(lf.setPropertyValue("FilterNoiseLevel", "-10"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(lf.setPropertyValue("FilterNoiseLevel", "0"));
 
     TS_ASSERT_THROWS(lf.setPropertyValue("ImageKey", "anything"),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
     TS_ASSERT_THROWS(lf.setPropertyValue("BITPIX", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(lf.setPropertyValue("NAXIS", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(lf.setPropertyValue("NAXIS1", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_initGood() {
@@ -127,7 +127,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     inputFile = g_smallFname1 + ", " + g_smallFname2;
     algToBeTested.setPropertyValue("Filename", inputFile);
@@ -135,7 +135,7 @@ public:
     // Set the ImageKey to be 0 (this used to be required, but the key
     // should not be there any longer);
     TS_ASSERT_THROWS(algToBeTested.setProperty<int>("ImageKey", 0),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_performAssertions() {
diff --git a/Framework/DataHandling/test/LoadGSSTest.h b/Framework/DataHandling/test/LoadGSSTest.h
index 124a4db8efe20d14fd104d2924c7a955b141fbb2..4c844d1682344922ca534356e508a68d1c2b7c0e 100644
--- a/Framework/DataHandling/test/LoadGSSTest.h
+++ b/Framework/DataHandling/test/LoadGSSTest.h
@@ -148,15 +148,15 @@ public:
 
     API::IAlgorithm_sptr loader2 = createAlgorithm();
     loader2->setPropertyValue("Filename", "AsciiExample.txt");
-    TS_ASSERT_THROWS(loader2->execute(), std::out_of_range)
+    TS_ASSERT_THROWS(loader2->execute(), const std::out_of_range &)
 
     API::IAlgorithm_sptr loader3 = createAlgorithm();
     loader3->setPropertyValue("Filename", "CSP79590.raw");
-    TS_ASSERT_THROWS(loader3->execute(), std::out_of_range)
+    TS_ASSERT_THROWS(loader3->execute(), const std::out_of_range &)
 
     API::IAlgorithm_sptr loader4 = createAlgorithm();
     loader4->setPropertyValue("Filename", "VULCAN_2916_neutron0_event.dat");
-    TS_ASSERT_THROWS(loader4->execute(), std::out_of_range)
+    TS_ASSERT_THROWS(loader4->execute(), const std::out_of_range &)
   }
 
 private:
diff --git a/Framework/DataHandling/test/LoadIDFFromNexusTest.h b/Framework/DataHandling/test/LoadIDFFromNexusTest.h
index b1b0abbd1a3bb1cb66e78773689cc3a9c99bb949..8d50824272c1ea6c32d528877140ea57bb055908 100644
--- a/Framework/DataHandling/test/LoadIDFFromNexusTest.h
+++ b/Framework/DataHandling/test/LoadIDFFromNexusTest.h
@@ -116,7 +116,7 @@ public:
 
     // Test a non-existant detector
     TS_ASSERT_THROWS(detectorInfo.detector(detectorInfo.indexOf(16735)),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     // Check the monitors are correctly marked
     const auto &detInfo = output->detectorInfo();
diff --git a/Framework/DataHandling/test/LoadISISNexusTest.h b/Framework/DataHandling/test/LoadISISNexusTest.h
index 1306b867c25841b3017785e3be04330fb9438f3d..605cfae38924f108824f197e9bfdfa3126eb9ded 100644
--- a/Framework/DataHandling/test/LoadISISNexusTest.h
+++ b/Framework/DataHandling/test/LoadISISNexusTest.h
@@ -54,10 +54,10 @@ private:
     TS_ASSERT(p != nullptr)
     TSM_ASSERT_THROWS("Shouldn't have a period less than the expected entry",
                       fetchPeriodLog(workspace, expectedPeriodNumber - 1),
-                      Mantid::Kernel::Exception::NotFoundError);
+                      const Mantid::Kernel::Exception::NotFoundError &);
     TSM_ASSERT_THROWS("Shouldn't have a period greater than the expected entry",
                       fetchPeriodLog(workspace, expectedPeriodNumber + 1),
-                      Mantid::Kernel::Exception::NotFoundError);
+                      const Mantid::Kernel::Exception::NotFoundError &);
     Mantid::Kernel::TimeSeriesProperty<bool> *period_property =
         dynamic_cast<Mantid::Kernel::TimeSeriesProperty<bool> *>(p);
     TS_ASSERT(period_property);
@@ -1608,7 +1608,7 @@ public:
     // Act + Assert
     TSM_ASSERT_THROWS("Should throw, since it does not makes sense to only "
                       "select monitors, but to also exclude them",
-                      ld.execute(), std::invalid_argument);
+                      ld.execute(), const std::invalid_argument &);
   }
 
   void
@@ -1629,7 +1629,7 @@ public:
     // Act + Assert
     TSM_ASSERT_THROWS("Should throw, since it does not makes sense to only "
                       "select monitors, but to also exclude them",
-                      ld.execute(), std::invalid_argument);
+                      ld.execute(), const std::invalid_argument &);
   }
 
   void
@@ -1647,7 +1647,7 @@ public:
     // Act + Assert
     TSM_ASSERT_THROWS("Should throw, since it does not makes sense to only "
                       "select monitors, but to also exclude them",
-                      ld.execute(), std::invalid_argument);
+                      ld.execute(), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h b/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h
index d13bdc2cb29621f52ea6d363fd1579ee24bac5e7..40292126ff970a65505fae6051b5dabbf9a957f1 100644
--- a/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h
+++ b/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h
@@ -150,7 +150,7 @@ public:
     alg.setProperty("P1", f1.getFileName());
     alg.setProperty("Pp", f1.getFileName());
     alg.setProperty("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/DataHandling/test/LoadInstrumentFromRawTest.h b/Framework/DataHandling/test/LoadInstrumentFromRawTest.h
index ce8b24d264ffaa1fe8c3593d72108f066767c2aa..4e88eabb87ffdc26db18a160134bc2b590885c74 100644
--- a/Framework/DataHandling/test/LoadInstrumentFromRawTest.h
+++ b/Framework/DataHandling/test/LoadInstrumentFromRawTest.h
@@ -97,7 +97,7 @@ public:
     // last
     const auto &ptrDetLast = detectorInfo.detector(detectorInfo.indexOf(8));
     TS_ASSERT_EQUALS(ptrDetLast.getID(), 8);
-    TS_ASSERT_THROWS(detectorInfo.indexOf(9), std::out_of_range);
+    TS_ASSERT_THROWS(detectorInfo.indexOf(9), const std::out_of_range &);
 
     // Check the monitors are correctly marked
     const auto &detInfo = output->detectorInfo();
diff --git a/Framework/DataHandling/test/LoadInstrumentTest.h b/Framework/DataHandling/test/LoadInstrumentTest.h
index 7602edf6454c018f6f744c68085245ee13c30f39..f41aaeb271bac765a60fa76c6953a4dc1f902259 100644
--- a/Framework/DataHandling/test/LoadInstrumentTest.h
+++ b/Framework/DataHandling/test/LoadInstrumentTest.h
@@ -140,7 +140,7 @@ public:
         detectorInfo.detector(detectorInfo.indexOf(413256));
     TS_ASSERT_EQUALS(ptrDetLast.getID(), 413256);
     TS_ASSERT_EQUALS(ptrDetLast.getName(), "pixel");
-    TS_ASSERT_THROWS(detectorInfo.indexOf(413257), std::out_of_range);
+    TS_ASSERT_THROWS(detectorInfo.indexOf(413257), const std::out_of_range &);
 
     // Test input data is unchanged
     Workspace2D_sptr output2DInst =
@@ -387,7 +387,7 @@ public:
     TS_ASSERT_EQUALS(1, detectorInfo.detectorIDs()[0]);
     TS_ASSERT_EQUALS(2, detectorInfo.detectorIDs()[1]);
     TS_ASSERT_EQUALS(10707511, detectorInfo.detectorIDs()[778244]);
-    TS_ASSERT_THROWS(detectorInfo.indexOf(778245), std::out_of_range);
+    TS_ASSERT_THROWS(detectorInfo.indexOf(778245), const std::out_of_range &);
   }
 
   /// Test the Nexus geometry loader from LOKI name
@@ -544,7 +544,7 @@ public:
                      V3D(3, 3, 0));
     // Note that one of the physical pixels doesn't exist in the neutronic
     // space
-    TS_ASSERT_THROWS(detectorInfo.indexOf(1004), std::out_of_range);
+    TS_ASSERT_THROWS(detectorInfo.indexOf(1004), const std::out_of_range &);
     TS_ASSERT_EQUALS(detectorInfo.position(detectorInfo.indexOf(1005)),
                      V3D(4, 3, 0));
 
diff --git a/Framework/DataHandling/test/LoadLogTest.h b/Framework/DataHandling/test/LoadLogTest.h
index 86bc55a0a65892905dff2c4a1c2b11e5f8b24726..2a3935a1c7fbd7f0edfe0c563735a2b4f3114646 100644
--- a/Framework/DataHandling/test/LoadLogTest.h
+++ b/Framework/DataHandling/test/LoadLogTest.h
@@ -55,7 +55,7 @@ public:
 
     outputSpace = "LoadLogTest-threeColumnFile";
     TS_ASSERT_THROWS(loader.setPropertyValue("Workspace", outputSpace),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
 
     Workspace_sptr ws =
         WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1);
@@ -106,7 +106,7 @@ public:
 
     outputSpace = "LoadLogTest-singleLogFile";
     TS_ASSERT_THROWS(loader.setPropertyValue("Workspace", outputSpace),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
     // Create an empty workspace and put it in the AnalysisDataService
     Workspace_sptr ws =
         WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1);
diff --git a/Framework/DataHandling/test/LoadMappingTableTest.h b/Framework/DataHandling/test/LoadMappingTableTest.h
index 8919199ce769051702aafe47a49519935161d103..3709ace829a201f668275590cf6c78adf014725b 100644
--- a/Framework/DataHandling/test/LoadMappingTableTest.h
+++ b/Framework/DataHandling/test/LoadMappingTableTest.h
@@ -60,7 +60,7 @@ public:
     if (!loader.isInitialized())
       loader.initialize();
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loader.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loader.execute(), const std::runtime_error &);
     // Now set it...
     loader.setPropertyValue("Filename", inputFile);
     loader.setPropertyValue("Workspace", outputSpace);
diff --git a/Framework/DataHandling/test/LoadMcStasNexusTest.h b/Framework/DataHandling/test/LoadMcStasNexusTest.h
index 6ec8c9214d180ee81c5c516bf937598b66608142..fdf8a151d9623bb69c2ba703a897c30b07693e08 100644
--- a/Framework/DataHandling/test/LoadMcStasNexusTest.h
+++ b/Framework/DataHandling/test/LoadMcStasNexusTest.h
@@ -44,7 +44,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // Now set it...
     // specify name of file to load workspace from
diff --git a/Framework/DataHandling/test/LoadMcStasTest.h b/Framework/DataHandling/test/LoadMcStasTest.h
index f5851d1ee9a152e8d4f4666a56f89436cb4079ba..9d1cfc97033fa459dfd4abc055502630dc3a7c83 100644
--- a/Framework/DataHandling/test/LoadMcStasTest.h
+++ b/Framework/DataHandling/test/LoadMcStasTest.h
@@ -45,7 +45,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     load_test("mcstas_event_hist.h5", outputSpace);
 
diff --git a/Framework/DataHandling/test/LoadMuonLogTest.h b/Framework/DataHandling/test/LoadMuonLogTest.h
index 07307d782df30398d795f3c10bd8b9b96d1a23c1..7a837547e685b40fa7bb3d55e19ae05027eff529 100644
--- a/Framework/DataHandling/test/LoadMuonLogTest.h
+++ b/Framework/DataHandling/test/LoadMuonLogTest.h
@@ -54,7 +54,7 @@ public:
 
     outputSpace = "LoadMuonLogTest-nexusdatafile";
     TS_ASSERT_THROWS(loaderNexusFile.setPropertyValue("Workspace", outputSpace),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
     // Create an empty workspace and put it in the AnalysisDataService
     MatrixWorkspace_sptr ws =
         WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1);
diff --git a/Framework/DataHandling/test/LoadMuonNexus1Test.h b/Framework/DataHandling/test/LoadMuonNexus1Test.h
index 26607ce9b892f5c3348fe69ce3e8bb33d1064fde..92ebd9b254bbc33d37c558604620a625c521c390 100644
--- a/Framework/DataHandling/test/LoadMuonNexus1Test.h
+++ b/Framework/DataHandling/test/LoadMuonNexus1Test.h
@@ -48,7 +48,7 @@ public:
     if (!nxLoad.isInitialized())
       nxLoad.initialize();
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(nxLoad.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(nxLoad.execute(), const std::runtime_error &);
 
     // Now set required filename and output workspace name
     inputFile = "emu00006473.nxs";
diff --git a/Framework/DataHandling/test/LoadNexusProcessedTest.h b/Framework/DataHandling/test/LoadNexusProcessedTest.h
index 73c2e68fcb995261fcb6f741d7059d3e86e942d6..c468fde1d8a7f8b6b6d3ce74484d8ca7d8bd3c44 100644
--- a/Framework/DataHandling/test/LoadNexusProcessedTest.h
+++ b/Framework/DataHandling/test/LoadNexusProcessedTest.h
@@ -625,7 +625,7 @@ public:
       {
         TS_ASSERT_THROWS(ConstColumnVector<int64_t> column =
                              ws->getVector("Integer"),
-                         std::runtime_error);
+                         const std::runtime_error &);
         ConstColumnVector<int> column = ws->getVector("Integer");
         TS_ASSERT_EQUALS(column[0], 5);
         TS_ASSERT_EQUALS(column[1], 3);
diff --git a/Framework/DataHandling/test/LoadNexusTest.h b/Framework/DataHandling/test/LoadNexusTest.h
index 09a77a63f74e659b7b9fff71c08bd77f78319db8..5a75fce8a233c2a15cb6352331eee4ec323fbda3 100644
--- a/Framework/DataHandling/test/LoadNexusTest.h
+++ b/Framework/DataHandling/test/LoadNexusTest.h
@@ -48,7 +48,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // Now set it...
     // specify name of file to load workspace from
diff --git a/Framework/DataHandling/test/LoadPLNTest.h b/Framework/DataHandling/test/LoadPLNTest.h
index e8fe3f970874a4bd1fd874a88b45ba2882300664..3f15f517f0f0e5ac49571cb43f651aba45dc5be1 100644
--- a/Framework/DataHandling/test/LoadPLNTest.h
+++ b/Framework/DataHandling/test/LoadPLNTest.h
@@ -31,7 +31,7 @@ public:
     algToBeTested.setPropertyValue("OutputWorkspace", outputSpace);
 
     // should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // missing event file - should fail execution
     std::string inputFile = "PLN0044464.hdf";
diff --git a/Framework/DataHandling/test/LoadRKHTest.h b/Framework/DataHandling/test/LoadRKHTest.h
index 9535a6c7e6d2560ac01626209ea02092bc2b7f0a..e7ea85e46eb8007f27d996b809fc260e86578a72 100644
--- a/Framework/DataHandling/test/LoadRKHTest.h
+++ b/Framework/DataHandling/test/LoadRKHTest.h
@@ -54,7 +54,7 @@ public:
       loadrkh.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(loadrkh.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loadrkh.execute(), const std::runtime_error &);
 
     // Set the file name
     loadrkh.setPropertyValue("Filename", dataFile);
diff --git a/Framework/DataHandling/test/LoadRaw3Test.h b/Framework/DataHandling/test/LoadRaw3Test.h
index 3f694216f93d88765cc1df62a64ce144fa640407..9b0032e63db4a2e1fe8dfd8b9854f6b6e7f3e775 100644
--- a/Framework/DataHandling/test/LoadRaw3Test.h
+++ b/Framework/DataHandling/test/LoadRaw3Test.h
@@ -60,7 +60,7 @@ public:
       loader.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loader.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loader.execute(), const std::runtime_error &);
 
     // Now set it...
     loader.setPropertyValue("Filename", inputFile);
@@ -313,38 +313,38 @@ public:
     Workspace_sptr output;
     // test that there is no workspace as it should have failed
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumMin", "5");
     loader3.setPropertyValue("SpectrumMax", "1");
     loader3.execute();
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumMin", "5");
     loader3.setPropertyValue("SpectrumMax", "3");
     loader3.execute();
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumMin", "5");
     loader3.setPropertyValue("SpectrumMax", "5");
     loader3.execute();
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumMin", "5");
     loader3.setPropertyValue("SpectrumMax", "3000");
     loader3.execute();
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumMin", "5");
     loader3.setPropertyValue("SpectrumMax", "10");
     loader3.setPropertyValue("SpectrumList", "999,3000");
     loader3.execute();
     TS_ASSERT_THROWS(output = AnalysisDataService::Instance().retrieve(outWS),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     loader3.setPropertyValue("SpectrumList", "999,2000");
     loader3.execute();
@@ -474,7 +474,7 @@ public:
       loader6.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loader6.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loader6.execute(), const std::runtime_error &);
 
     // Now set it...
     loader6.setPropertyValue("Filename", inputFile);
diff --git a/Framework/DataHandling/test/LoadRawBin0Test.h b/Framework/DataHandling/test/LoadRawBin0Test.h
index de4c5a01e5e7f3e39845e216e5024f99ae34d22e..65b913b36457ebf09a00b0ce7bc4f96ce5f727fb 100644
--- a/Framework/DataHandling/test/LoadRawBin0Test.h
+++ b/Framework/DataHandling/test/LoadRawBin0Test.h
@@ -47,7 +47,7 @@ public:
       loader.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loader.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loader.execute(), const std::runtime_error &);
 
     // Now set it...
     loader.setPropertyValue("Filename", inputFile);
diff --git a/Framework/DataHandling/test/LoadRawSpectrum0Test.h b/Framework/DataHandling/test/LoadRawSpectrum0Test.h
index be2715bc8049c1ff19c44f132e745b57d4a151bd..fae42744e5f54267775efd590c4f301b8a5d4203 100644
--- a/Framework/DataHandling/test/LoadRawSpectrum0Test.h
+++ b/Framework/DataHandling/test/LoadRawSpectrum0Test.h
@@ -51,7 +51,7 @@ public:
       loader.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loader.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loader.execute(), const std::runtime_error &);
 
     // Now set it...
     loader.setPropertyValue("Filename", inputFile);
diff --git a/Framework/DataHandling/test/LoadSESANSTest.h b/Framework/DataHandling/test/LoadSESANSTest.h
index 3ff49b05aac97d7c7179133c7cdb6586918fce23..00722d4b61273eb42f6012a4f1eb78013de1a1f5 100644
--- a/Framework/DataHandling/test/LoadSESANSTest.h
+++ b/Framework/DataHandling/test/LoadSESANSTest.h
@@ -110,7 +110,7 @@ private:
   void attemptToLoadBadFile(const std::string &filename) {
     const std::string filepath = getTestFilePath(filename);
     TS_ASSERT_THROWS_NOTHING(testAlg.setProperty("Filename", filepath));
-    TS_ASSERT_THROWS(testAlg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(testAlg.execute(), const std::runtime_error &);
   }
 
   LoadSESANS testAlg;
diff --git a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h
index a465f3edea67c8a6fc889ba4b112614209c7d96c..60c68b9965fcb778203e2f28cb0563cb2051a242 100644
--- a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h
+++ b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h
@@ -86,7 +86,7 @@ public:
     alg.setProperty("RotationMatrix", "-1,0,1,0,0,0,0,1");
     boost::shared_ptr<MeshObject> environmentMesh = nullptr;
     environmentMesh = loadCube();
-    TS_ASSERT_THROWS(alg.rotate(environmentMesh), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.rotate(environmentMesh), const std::invalid_argument &);
   }
 
   void testRotateFailInvalidMatrix() {
@@ -95,7 +95,7 @@ public:
     alg.setProperty("RotationMatrix", "6,1,1,4,-2,5,2,8,7");
     boost::shared_ptr<MeshObject> environmentMesh = nullptr;
     environmentMesh = loadCube();
-    TS_ASSERT_THROWS(alg.rotate(environmentMesh), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.rotate(environmentMesh), const std::invalid_argument &);
   }
 
   void testSetMaterial() {
diff --git a/Framework/DataHandling/test/LoadSpice2dTest.h b/Framework/DataHandling/test/LoadSpice2dTest.h
index 335a83770bc98a20b30b18bb6ff041fc2f5fa5c2..51bc27170d0b57597b14a0be5400788d52ed9663 100644
--- a/Framework/DataHandling/test/LoadSpice2dTest.h
+++ b/Framework/DataHandling/test/LoadSpice2dTest.h
@@ -52,7 +52,7 @@ public:
       spice2d.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(spice2d.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(spice2d.execute(), const std::runtime_error &);
 
     // Set the file name
     spice2d.setPropertyValue("Filename", inputFile);
@@ -188,7 +188,7 @@ public:
       spice2d.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(spice2d.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(spice2d.execute(), const std::runtime_error &);
 
     // Set the file name
     spice2d.setPropertyValue("Filename", inputFile);
diff --git a/Framework/DataHandling/test/LoadTBLTest.h b/Framework/DataHandling/test/LoadTBLTest.h
index 30d4bd75a2be9a702b5b9de324c8f068c253f2e1..7230989f652606e0e7ceb50d99178369169f99bd 100644
--- a/Framework/DataHandling/test/LoadTBLTest.h
+++ b/Framework/DataHandling/test/LoadTBLTest.h
@@ -363,7 +363,7 @@ public:
     m_abspath = alg->getPropertyValue("Filename"); // Get absolute path
     TS_ASSERT_THROWS_NOTHING(
         alg->setPropertyValue("OutputWorkspace", m_wsName));
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
 
     cleanupafterwards();
   }
@@ -389,7 +389,7 @@ public:
     m_abspath = alg->getPropertyValue("Filename"); // Get absolute path
     TS_ASSERT_THROWS_NOTHING(
         alg->setPropertyValue("OutputWorkspace", m_wsName));
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     cleanupafterwards();
   }
 
diff --git a/Framework/DataHandling/test/PDLoadCharacterizationsTest.h b/Framework/DataHandling/test/PDLoadCharacterizationsTest.h
index 3c46b8f328c0cb53cb10298b23d1f61800e5ad95..d7b09ee9ef125f336a1ee626dbd8dec1b5cf51d9 100644
--- a/Framework/DataHandling/test/PDLoadCharacterizationsTest.h
+++ b/Framework/DataHandling/test/PDLoadCharacterizationsTest.h
@@ -439,7 +439,7 @@ public:
     alg.setPropertyValue("ExpIniFilename", "NOMAD_exp.ini");
     alg.setPropertyValue("OutputWorkspace", WKSP_NAME);
     alg.setRethrows(true); // so the exception can be seen by testing
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/DataHandling/test/ReadMaterialTest.h b/Framework/DataHandling/test/ReadMaterialTest.h
index b73d0c2b0261fc69d27cd4f013262f60fec542c4..30c9be3ea01f389e5eb2313eda0fa24945543275 100644
--- a/Framework/DataHandling/test/ReadMaterialTest.h
+++ b/Framework/DataHandling/test/ReadMaterialTest.h
@@ -350,7 +350,7 @@ public:
 
     ReadMaterial reader;
     reader.setMaterialParameters(params);
-    TS_ASSERT_THROWS(reader.buildMaterial(), std::runtime_error);
+    TS_ASSERT_THROWS(reader.buildMaterial(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/DataHandling/test/RemoveLogsTest.h b/Framework/DataHandling/test/RemoveLogsTest.h
index ff8981a927a99d97bb276306e6261fc4298ac7a9..b5305f9d25532c7830494f078727d6e935e3436b 100644
--- a/Framework/DataHandling/test/RemoveLogsTest.h
+++ b/Framework/DataHandling/test/RemoveLogsTest.h
@@ -110,8 +110,8 @@ public:
     // Ensure it has the correct log data
     TS_ASSERT_DIFFERS(output->run().getLogData().size(), 0);
 
-    TS_ASSERT_THROWS(output->run().getLogData("some_prop"), std::runtime_error);
-    TS_ASSERT_THROWS(output->run().getLogData("T0"), std::runtime_error);
+    TS_ASSERT_THROWS(output->run().getLogData("some_prop"), const std::runtime_error &);
+    TS_ASSERT_THROWS(output->run().getLogData("T0"), const std::runtime_error &);
 
     TS_ASSERT_THROWS_NOTHING(output->run().getLogData("Ei"));
     TS_ASSERT_THROWS_NOTHING(output->run().getLogData("scan_index"));
diff --git a/Framework/DataHandling/test/SaveAscii2Test.h b/Framework/DataHandling/test/SaveAscii2Test.h
index 055439f1e3e3c470ed041dff7232a2cba36c7aab..5953cb4a3e812aecd7e64cd138a055aabd308d3b 100644
--- a/Framework/DataHandling/test/SaveAscii2Test.h
+++ b/Framework/DataHandling/test/SaveAscii2Test.h
@@ -454,7 +454,7 @@ public:
     // then check the workspace bounds testing
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("WorkspaceIndexMax", "5"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -480,7 +480,7 @@ public:
     // bounds aren't checked
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("WorkspaceIndexMax", "7"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm didn't run so there should be no file
     // the algorithm shouldn't have written a file to disk
@@ -516,7 +516,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("WorkspaceIndexMin", "3"));
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("WorkspaceIndexMax", "2"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -551,7 +551,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("SpectrumList", "2, 3, 1"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -645,7 +645,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CommentIndicator", "3"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -662,7 +662,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CommentIndicator", "e"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -679,7 +679,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CommentIndicator", "-"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -696,7 +696,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CommentIndicator", "+"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -714,7 +714,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("Separator", "UserDefined"));
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CustomSeparator", "e"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -732,7 +732,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("Separator", "UserDefined"));
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CustomSeparator", "3"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -750,7 +750,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("Separator", "UserDefined"));
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CustomSeparator", "+"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
@@ -768,7 +768,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("Separator", "UserDefined"));
     TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("CustomSeparator", "-"));
 
-    TS_ASSERT_THROWS(save.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(save.execute(), const std::invalid_argument &);
 
     // the algorithm shouldn't have written a file to disk
     TS_ASSERT(!Poco::File(filename).exists());
diff --git a/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h b/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h
index a7112c346aa1fc3bc678589f6b2dcc623c432a5c..e6d658925c30f3625a7784e67050a959c4c2f213 100644
--- a/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h
+++ b/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h
@@ -37,7 +37,7 @@ public:
     SaveBankScatteringAngles testAlg;
     testAlg.initialize();
     TS_ASSERT_THROWS(testAlg.setProperty("InputWorkspace", "ws"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     ADS.remove("ws");
   }
diff --git a/Framework/DataHandling/test/SaveCSVTest.h b/Framework/DataHandling/test/SaveCSVTest.h
index e211ac95353afbbe5ecd7bd11411da780ff52e84..04e0ab2d17011220b9739ac08cface826d1f06f9 100644
--- a/Framework/DataHandling/test/SaveCSVTest.h
+++ b/Framework/DataHandling/test/SaveCSVTest.h
@@ -71,7 +71,7 @@ public:
     algToBeTested.setPropertyValue("InputWorkspace", "SAVECSVTEST-testSpace");
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
     TS_ASSERT_EQUALS(algToBeTested.isExecuted(), false)
 
     // Now set it...
diff --git a/Framework/DataHandling/test/SaveDiffCalTest.h b/Framework/DataHandling/test/SaveDiffCalTest.h
index 884e4dc5f86ae5277fc16ed5acc17b03cb952469..6825892872f4854d724e88b82c1523aabcb717ed 100644
--- a/Framework/DataHandling/test/SaveDiffCalTest.h
+++ b/Framework/DataHandling/test/SaveDiffCalTest.h
@@ -103,7 +103,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("GroupingWorkspace", groupWS));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("MaskWorkspace", maskWS));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Filename", FILENAME));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -120,7 +120,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("MaskWorkspace", maskWS));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Filename", FILENAME));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("CalibrationWorkspace", calWS));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/DataHandling/test/SaveFITSTest.h b/Framework/DataHandling/test/SaveFITSTest.h
index 9257f7a53a2c78aca2ceae3b750be1b5a33eb8d7..7bfa59e8e31d5e6d768140de5180b5bf75e8e981 100644
--- a/Framework/DataHandling/test/SaveFITSTest.h
+++ b/Framework/DataHandling/test/SaveFITSTest.h
@@ -49,15 +49,17 @@ public:
 
     TS_ASSERT_THROWS(
         alg->setPropertyValue("OutputWorkspace", "_unused_for_child"),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
 
     TS_ASSERT_THROWS(
         alg->setPropertyValue("BitDepth", "this_is_wrong_you_must_fail"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg->setProperty("BitDepth", 10), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->setProperty("BitDepth", 10),
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg->setProperty("BitDepth", 64), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->setProperty("BitDepth", 64),
+                     const std::invalid_argument &);
   }
 
   void test_exec_fail() {
@@ -67,9 +69,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Filename", "foo.fits"));
     TS_ASSERT_THROWS(
         alg.setPropertyValue("InputWorkspace", "inexistent_workspace_fails"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -85,7 +87,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "The algorithm should not accept workspaces if the units are wrong",
-        alg.setProperty("InputWorkspace", ws), std::invalid_argument);
+        alg.setProperty("InputWorkspace", ws), const std::invalid_argument &);
   }
 
   void test_exec_fails_empty() {
@@ -101,7 +103,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "The algorithm should not accept empty / uninitialized workspaces",
-        alg.setProperty("InputWorkspace", ws), std::invalid_argument);
+        alg.setProperty("InputWorkspace", ws), const std::invalid_argument &);
   }
 
   void test_exec_runs_ok() {
diff --git a/Framework/DataHandling/test/SaveGDATest.h b/Framework/DataHandling/test/SaveGDATest.h
index 7f02a59bd1882184a0215904245e5f18f682d155..b3be210d72e85df30fa756bd6e925b3d69f7f2f1 100644
--- a/Framework/DataHandling/test/SaveGDATest.h
+++ b/Framework/DataHandling/test/SaveGDATest.h
@@ -90,7 +90,7 @@ public:
     SaveGDA testAlg;
     testAlg.initialize();
     TS_ASSERT_THROWS(testAlg.setProperty("InputWorkspace", "ws"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     ADS.remove("ws");
   }
diff --git a/Framework/DataHandling/test/SaveNXSPETest.h b/Framework/DataHandling/test/SaveNXSPETest.h
index 4f773a592274bc7d4605ca8063777cfd3f7baee3..e9691bdfbd7adc27313e9d270b7b9377013c2264 100644
--- a/Framework/DataHandling/test/SaveNXSPETest.h
+++ b/Framework/DataHandling/test/SaveNXSPETest.h
@@ -127,7 +127,8 @@ public:
 
     // throws file not exist from ChildAlgorithm
     saver.setRethrows(true);
-    TS_ASSERT_THROWS(saver.execute(), Mantid::Kernel::Exception::FileError);
+    TS_ASSERT_THROWS(saver.execute(),
+                     const Mantid::Kernel::Exception::FileError &);
     TS_ASSERT(Poco::File(outputFile).exists());
 
     if (Poco::File(outputFile).exists())
diff --git a/Framework/DataHandling/test/SaveNexusProcessedTest.h b/Framework/DataHandling/test/SaveNexusProcessedTest.h
index da79348691c44daca3a601483997939e63f63006..00ab0675160cb17c3eb3809ea3ca40da6d83c5d4 100644
--- a/Framework/DataHandling/test/SaveNexusProcessedTest.h
+++ b/Framework/DataHandling/test/SaveNexusProcessedTest.h
@@ -976,7 +976,7 @@ private:
       algToBeTested.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(algToBeTested.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algToBeTested.execute(), const std::runtime_error &);
 
     // create dummy 2D-workspace
     Workspace2D_sptr localWorkspace2D =
diff --git a/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h b/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h
index 8647da7638fe0cb393a23a8fcba97dd224c17891..b64f6a6466f480ae2148559b2c59349fa018414e 100644
--- a/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h
+++ b/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h
@@ -32,7 +32,7 @@ public:
     const auto fileHandle = Poco::TemporaryFile();
     auto alg = createAlg(ws, fileHandle.path());
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void testEventWSThrows() {
@@ -44,7 +44,7 @@ public:
     const auto fileHandle = Poco::TemporaryFile();
     auto alg = createAlg(ws, fileHandle.path());
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void testFileMatchesExpectedFormat() {
diff --git a/Framework/DataHandling/test/SaveRKHTest.h b/Framework/DataHandling/test/SaveRKHTest.h
index b6b7d96ed6481174a414c527463ec4f8faaef7db..028860043a73a797adde7efdc97abb12e4aca1e4 100644
--- a/Framework/DataHandling/test/SaveRKHTest.h
+++ b/Framework/DataHandling/test/SaveRKHTest.h
@@ -49,7 +49,7 @@ public:
       testAlgorithm1.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(testAlgorithm1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(testAlgorithm1.execute(), const std::runtime_error &);
     // Need a test workspace to use as input
     MatrixWorkspace_sptr inputWS1 =
         WorkspaceCreationHelper::create2DWorkspaceBinned(1, 10, 1.0);
@@ -117,7 +117,7 @@ public:
     if (!testAlgorithm2.isInitialized())
       testAlgorithm2.initialize();
 
-    TS_ASSERT_THROWS(testAlgorithm2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(testAlgorithm2.execute(), const std::runtime_error &);
 
     using namespace Mantid::API;
     MatrixWorkspace_sptr inputWS2 =
@@ -188,7 +188,7 @@ public:
       testAlgorithm3.initialize();
 
     // No parameters have been set yet, so it should throw
-    TS_ASSERT_THROWS(testAlgorithm3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(testAlgorithm3.execute(), const std::runtime_error &);
     // Need a test workspace to use as input
     auto inputWS3 = createInputWorkspaceHistoWithXerror();
     inputWS3->setDistribution(false);
diff --git a/Framework/DataHandling/test/SaveReflectometryAsciiTest.h b/Framework/DataHandling/test/SaveReflectometryAsciiTest.h
index dc62981c1c8ca4b788b18be801d58b18950537b6..3e3205f0a4ba031e427c6661579147ee873e261f 100644
--- a/Framework/DataHandling/test/SaveReflectometryAsciiTest.h
+++ b/Framework/DataHandling/test/SaveReflectometryAsciiTest.h
@@ -50,8 +50,8 @@ public:
     alg.setRethrows(true);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Filename", "ws"))
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", "abc"),
-                     std::invalid_argument)
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error)
+                     const std::invalid_argument &)
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &)
     TS_ASSERT(!alg.isExecuted())
   }
 
diff --git a/Framework/DataHandling/test/SaveSESANSTest.h b/Framework/DataHandling/test/SaveSESANSTest.h
index 55cd9c239bb0733a9629d122ec024f5adc9cafed..f34feb0e4b10597a48c8d1a8dac4b55ce82563b1 100644
--- a/Framework/DataHandling/test/SaveSESANSTest.h
+++ b/Framework/DataHandling/test/SaveSESANSTest.h
@@ -49,7 +49,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(testAlg.setProperty("InputWorkspace", ws));
 
     // Should throw, as we can't save more than one histogram
-    TS_ASSERT_THROWS(testAlg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(testAlg.execute(), const std::runtime_error &);
   }
 
   void test_exec() {
diff --git a/Framework/DataHandling/test/SetBeamTest.h b/Framework/DataHandling/test/SetBeamTest.h
index 8d327517af77202701ae3335bdfd16e1beb6ca41..dd1e0f8363ed0fa25fadde95d95a1470753af8c0 100644
--- a/Framework/DataHandling/test/SetBeamTest.h
+++ b/Framework/DataHandling/test/SetBeamTest.h
@@ -62,7 +62,7 @@ public:
 
     auto alg = createAlgorithm();
     TS_ASSERT_THROWS(alg->setProperty("InputWorkspace", inputWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_No_Geometry_Inputs_Not_Accepted() {
@@ -72,7 +72,7 @@ public:
 
     auto alg = createAlgorithm();
     alg->setProperty("InputWorkspace", inputWS);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Missing_Geometry_Inputs_Not_Accepted() {
@@ -85,14 +85,14 @@ public:
     alg->setProperty("InputWorkspace", inputWS);
     auto props = boost::make_shared<PropertyManager>();
     alg->setProperty("Geometry", props);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     props = createRectangularBeamProps();
     props->removeProperty("Width");
     alg->setProperty("Geometry", props);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     props->removeProperty("Height");
     alg->setProperty("Geometry", props);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   //----------------------------------------------------------------------------
diff --git a/Framework/DataHandling/test/SetSampleTest.h b/Framework/DataHandling/test/SetSampleTest.h
index 4de78a6110eb5e0eb5e8b8ae593e9b72b3a7b68e..a6537c4f2e896548ccd3d39c85e61fff682b5686 100644
--- a/Framework/DataHandling/test/SetSampleTest.h
+++ b/Framework/DataHandling/test/SetSampleTest.h
@@ -319,7 +319,7 @@ public:
     args->declareProperty(
         Mantid::Kernel::make_unique<StringProperty>("Container", "8mm"), "");
     alg->setProperty("Environment", args);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Environment_Args_Without_Container_Invalid() {
@@ -333,7 +333,7 @@ public:
     args->declareProperty(
         Mantid::Kernel::make_unique<StringProperty>("Name", m_envName), "");
     alg->setProperty("Environment", args);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Environment_Args_With_Empty_Strings_Invalid() {
@@ -347,12 +347,12 @@ public:
     args->declareProperty(
         Mantid::Kernel::make_unique<StringProperty>("Name", ""), "");
     alg->setProperty("Environment", args);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     args->removeProperty("Name");
     args->declareProperty(
         Mantid::Kernel::make_unique<StringProperty>("Container", ""), "");
     alg->setProperty("Environment", args);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_Negative_FlatPlate_Dimensions_Give_Validation_Errors() {
diff --git a/Framework/DataHandling/test/SortTableWorkspaceTest.h b/Framework/DataHandling/test/SortTableWorkspaceTest.h
index a0669171f233ff9cdb0aba8eb7bb5f52d4b53f9c..112e4d15de0cc7e8189ddbf462ebe8f3398ff9d3 100644
--- a/Framework/DataHandling/test/SortTableWorkspaceTest.h
+++ b/Framework/DataHandling/test/SortTableWorkspaceTest.h
@@ -473,7 +473,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspace", ws));
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", outWSName));
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -511,7 +511,7 @@ public:
         alg.setPropertyValue("OutputWorkspace", outWSName));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Columns", columns));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Ascending", ascending));
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -548,7 +548,7 @@ public:
         alg.setPropertyValue("OutputWorkspace", outWSName));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Columns", columns));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Ascending", ascending));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -586,7 +586,7 @@ public:
         alg.setPropertyValue("OutputWorkspace", outWSName));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Columns", columns));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Ascending", ascending));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 };
diff --git a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h
index 3a477469a1ff3d7cc656c840d4f19c2611bf3dd4..65f4fe262aa255d55c580753b2e43187ed60bbb4 100644
--- a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h
+++ b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h
@@ -149,7 +149,7 @@ public:
     loadTestInstrument();
     // No header
     TS_ASSERT_THROWS(runUpdateInstrument(datfile.getFileName()),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_GroupedDetector_Has_All_Components_Moved_To_Same_Coordinates() {
@@ -204,7 +204,7 @@ private:
 
     loadTestInstrument();
     // No header
-    TS_ASSERT_THROWS(runUpdateInstrument(filename), std::invalid_argument);
+    TS_ASSERT_THROWS(runUpdateInstrument(filename), const std::invalid_argument &);
 
     // Header claims fewer columns than there actually are
     std::string badHeader = "spectrum,theta,t0,-";
diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h
index 9d872820d4557c51d344acec59457e73d1c2a7f4..cf43f57c787ecd1000edc3e645ca6d3c6ba26fd4 100644
--- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h
+++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h
@@ -1093,7 +1093,7 @@ operator++() noexcept(is_same<Signed, unsigned>::value) {
 
 template <size_t Bits, typename Signed>
 constexpr wide_integer<Bits, Signed> wide_integer<Bits, Signed>::
-operator++(int)noexcept(is_same<Signed, unsigned>::value) {
+operator++(int) noexcept(is_same<Signed, unsigned>::value) {
   auto tmp = *this;
   *this = _impl::operator_plus(*this, 1);
   return tmp;
@@ -1108,7 +1108,7 @@ operator--() noexcept(is_same<Signed, unsigned>::value) {
 
 template <size_t Bits, typename Signed>
 constexpr wide_integer<Bits, Signed> wide_integer<Bits, Signed>::
-operator--(int)noexcept(is_same<Signed, unsigned>::value) {
+operator--(int) noexcept(is_same<Signed, unsigned>::value) {
   auto tmp = *this;
   *this = _impl::operator_minus(*this, 1);
   return tmp;
diff --git a/Framework/DataObjects/src/EventWorkspaceMRU.cpp b/Framework/DataObjects/src/EventWorkspaceMRU.cpp
index ebd6c4f0a8f61f92b7f46c507d0dc56c37f30245..9678d376f03bda0eb1befcc4695de98c205d5ca6 100644
--- a/Framework/DataObjects/src/EventWorkspaceMRU.cpp
+++ b/Framework/DataObjects/src/EventWorkspaceMRU.cpp
@@ -93,7 +93,7 @@ Kernel::cow_ptr<HistogramData::HistogramY>
 EventWorkspaceMRU::findY(size_t thread_num, const EventList *index) {
   Poco::ScopedReadRWLock _lock(m_changeMruListsMutexY);
   auto result = m_bufferedDataY[thread_num]->find(
-      reinterpret_cast<const std::uintptr_t>(index));
+      reinterpret_cast<std::uintptr_t>(index));
   if (result)
     return result->m_data;
   return YType(nullptr);
@@ -109,7 +109,7 @@ Kernel::cow_ptr<HistogramData::HistogramE>
 EventWorkspaceMRU::findE(size_t thread_num, const EventList *index) {
   Poco::ScopedReadRWLock _lock(m_changeMruListsMutexE);
   auto result = m_bufferedDataE[thread_num]->find(
-      reinterpret_cast<const std::uintptr_t>(index));
+      reinterpret_cast<std::uintptr_t>(index));
   if (result)
     return result->m_data;
   return EType(nullptr);
@@ -125,7 +125,7 @@ void EventWorkspaceMRU::insertY(size_t thread_num, YType data,
                                 const EventList *index) {
   Poco::ScopedReadRWLock _lock(m_changeMruListsMutexY);
   auto yWithMarker =
-      new TypeWithMarker<YType>(reinterpret_cast<const std::uintptr_t>(index));
+      new TypeWithMarker<YType>(reinterpret_cast<std::uintptr_t>(index));
   yWithMarker->m_data = std::move(data);
   auto oldData = m_bufferedDataY[thread_num]->insert(yWithMarker);
   // And clear up the memory of the old one, if it is dropping out.
@@ -142,7 +142,7 @@ void EventWorkspaceMRU::insertE(size_t thread_num, EType data,
                                 const EventList *index) {
   Poco::ScopedReadRWLock _lock(m_changeMruListsMutexE);
   auto eWithMarker =
-      new TypeWithMarker<EType>(reinterpret_cast<const std::uintptr_t>(index));
+      new TypeWithMarker<EType>(reinterpret_cast<std::uintptr_t>(index));
   eWithMarker->m_data = std::move(data);
   auto oldData = m_bufferedDataE[thread_num]->insert(eWithMarker);
   // And clear up the memory of the old one, if it is dropping out.
@@ -158,14 +158,14 @@ void EventWorkspaceMRU::deleteIndex(const EventList *index) {
     Poco::ScopedReadRWLock _lock1(m_changeMruListsMutexE);
     for (auto &data : m_bufferedDataE) {
       if (data) {
-        data->deleteIndex(reinterpret_cast<const std::uintptr_t>(index));
+        data->deleteIndex(reinterpret_cast<std::uintptr_t>(index));
       }
     }
   }
   Poco::ScopedReadRWLock _lock2(m_changeMruListsMutexY);
   for (auto &data : m_bufferedDataY) {
     if (data) {
-      data->deleteIndex(reinterpret_cast<const std::uintptr_t>(index));
+      data->deleteIndex(reinterpret_cast<std::uintptr_t>(index));
     }
   }
 }
diff --git a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h
index 5920396c2c160682468a56144d51198470684528..40863f9c3c6b5576f024e07d4fed1cd09951499d 100644
--- a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h
+++ b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h
@@ -107,7 +107,7 @@ public:
     AffineMatrixParameterParser parser;
     AffineMatrixParameterParser otherParser;
     TS_ASSERT_THROWS(parser.setSuccessorParser(&otherParser),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testThrowsIfWrongXML() {
@@ -120,7 +120,7 @@ public:
 
     AffineMatrixParameterParser parser;
 
-    TS_ASSERT_THROWS(parser.createParameter(pRootElem), std::runtime_error);
+    TS_ASSERT_THROWS(parser.createParameter(pRootElem), const std::runtime_error &);
   }
 };
 #endif
diff --git a/Framework/DataObjects/test/AffineMatrixParameterTest.h b/Framework/DataObjects/test/AffineMatrixParameterTest.h
index 7dc952802977979ffe55b403a3969f316a7d478f..e48a7d7baf2c33ed7ba37f4b718d8725c239df12 100644
--- a/Framework/DataObjects/test/AffineMatrixParameterTest.h
+++ b/Framework/DataObjects/test/AffineMatrixParameterTest.h
@@ -50,14 +50,14 @@ public:
     AffineMatrixParameter param(1, 3);
     AffineMatrixType transform(4, 4);
 
-    TS_ASSERT_THROWS(param.setMatrix(transform), std::runtime_error);
+    TS_ASSERT_THROWS(param.setMatrix(transform), const std::runtime_error &);
   }
 
   void testSetMatrixThrowsIfInDimsNotEqual() {
     AffineMatrixParameter param(3, 1);
     AffineMatrixType transform(4, 4);
 
-    TS_ASSERT_THROWS(param.setMatrix(transform), std::runtime_error);
+    TS_ASSERT_THROWS(param.setMatrix(transform), const std::runtime_error &);
   }
 
   void testAssign() {
@@ -90,14 +90,14 @@ public:
     AffineMatrixParameter A(2, 4);
     AffineMatrixParameter B(4, 4);
 
-    TS_ASSERT_THROWS(B = A, std::runtime_error);
+    TS_ASSERT_THROWS(B = A, const std::runtime_error &);
   }
 
   void testAssignementThrowsIfInDimsNotEqual() {
     AffineMatrixParameter A(4, 2);
     AffineMatrixParameter B(4, 4);
 
-    TS_ASSERT_THROWS(B = A, std::runtime_error);
+    TS_ASSERT_THROWS(B = A, const std::runtime_error &);
   }
 
   void testToXMLString() {
diff --git a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h
index 0d8868ff0fb01d0c7d4d6fa42f829dc57aa54663..4f54deb50e7ede4d1a49914a8063bec45b369d52 100644
--- a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h
+++ b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h
@@ -56,7 +56,8 @@ public:
     TS_ASSERT_EQUALS("MDEvent", typeName);
 
     // set size
-    TS_ASSERT_THROWS(pSaver->setDataType(9, typeName), std::invalid_argument);
+    TS_ASSERT_THROWS(pSaver->setDataType(9, typeName),
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(pSaver->setDataType(8, typeName));
     TS_ASSERT_THROWS_NOTHING(pSaver->getDataType(CoordSize, typeName));
     TS_ASSERT_EQUALS(8, CoordSize);
@@ -64,7 +65,7 @@ public:
 
     // set type
     TS_ASSERT_THROWS(pSaver->setDataType(4, "UnknownEvent"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(pSaver->setDataType(4, "MDLeanEvent"));
     TS_ASSERT_THROWS_NOTHING(pSaver->getDataType(CoordSize, typeName));
     TS_ASSERT_EQUALS(4, CoordSize);
@@ -74,10 +75,10 @@ public:
   }
 
   void test_CreateOrOpenFile() {
+    using Mantid::coord_t;
     using Mantid::API::FileFinder;
     using Mantid::DataObjects::BoxControllerNeXusIO;
     using Mantid::Kernel::Exception::FileError;
-    using Mantid::coord_t;
 
     BoxControllerNeXusIO *pSaver(nullptr);
     TS_ASSERT_THROWS_NOTHING(pSaver = createTestBoxController());
@@ -85,7 +86,8 @@ public:
     std::string FullPathFile;
 
     TSM_ASSERT_THROWS("new file does not open in read mode",
-                      pSaver->openFile(this->xxfFileName, "r"), FileError);
+                      pSaver->openFile(this->xxfFileName, "r"),
+                      const FileError &);
 
     TS_ASSERT_THROWS_NOTHING(pSaver->openFile(this->xxfFileName, "w"));
     TS_ASSERT_THROWS_NOTHING(FullPathFile = pSaver->getFileName());
diff --git a/Framework/DataObjects/test/CoordTransformAffineParserTest.h b/Framework/DataObjects/test/CoordTransformAffineParserTest.h
index cbb6d9ea27110e65177ded980199937c08fc52c4..fb0222aabd4607f497179a1e1c1f155ef9bb7e0a 100644
--- a/Framework/DataObjects/test/CoordTransformAffineParserTest.h
+++ b/Framework/DataObjects/test/CoordTransformAffineParserTest.h
@@ -77,7 +77,7 @@ public:
 
     CoordTransformAffineParser parser;
     TSM_ASSERT_THROWS("XML root node must be a coordinate transform",
-                      parser.createTransform(pRootElem), std::invalid_argument);
+                      parser.createTransform(pRootElem), const std::invalid_argument &);
   }
 
   void testNoSuccessorThrows() {
@@ -95,7 +95,7 @@ public:
 
     CoordTransformAffineParser parser;
     TSM_ASSERT_THROWS("Should throw since no successor parser has been set",
-                      parser.createTransform(pRootElem), std::runtime_error);
+                      parser.createTransform(pRootElem), const std::runtime_error &);
   }
 
   void testDelegateToSuccessor() {
diff --git a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h
index f104b5e8bf98a97905a2a3c8011809142be88966..4d93577dc75c27dee26d1e00ca074141b54f16ce 100644
--- a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h
+++ b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h
@@ -69,7 +69,7 @@ public:
 
     CoordTransformDistanceParser parser;
     TSM_ASSERT_THROWS("XML root node must be a coordinate transform",
-                      parser.createTransform(pRootElem), std::invalid_argument);
+                      parser.createTransform(pRootElem), const std::invalid_argument &);
   }
 
   void testNoSuccessorThrows() {
@@ -87,7 +87,7 @@ public:
 
     CoordTransformDistanceParser parser;
     TSM_ASSERT_THROWS("Should throw since no successor parser has been set",
-                      parser.createTransform(pRootElem), std::runtime_error);
+                      parser.createTransform(pRootElem), const std::runtime_error &);
   }
 
   void testDelegateToSuccessor() {
diff --git a/Framework/DataObjects/test/EventListTest.h b/Framework/DataObjects/test/EventListTest.h
index 730f0abdface4455f9050e7fdf9ef5bf8c5466eb..fd513f6df3b94b5910cb63db73608bd140feb9dc 100644
--- a/Framework/DataObjects/test/EventListTest.h
+++ b/Framework/DataObjects/test/EventListTest.h
@@ -114,23 +114,23 @@ public:
     TS_ASSERT_EQUALS(target.getEventType(), EventType::TOF)
     TS_ASSERT_EQUALS(target.getSortType(), eventList.getSortType());
     TS_ASSERT_EQUALS(target.getEvents(), eventList.getEvents());
-    TS_ASSERT_THROWS(target.getWeightedEvents(), std::runtime_error);
-    TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), std::runtime_error);
+    TS_ASSERT_THROWS(target.getWeightedEvents(), const std::runtime_error &);
+    TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), const std::runtime_error &);
 
     eventList.switchTo(EventType::WEIGHTED);
     target.copyDataFrom(eventList);
     TS_ASSERT_EQUALS(target.getEventType(), EventType::WEIGHTED)
     TS_ASSERT_EQUALS(target.getSortType(), eventList.getSortType());
-    TS_ASSERT_THROWS(target.getEvents(), std::runtime_error);
+    TS_ASSERT_THROWS(target.getEvents(), const std::runtime_error &);
     TS_ASSERT_EQUALS(target.getWeightedEvents(), eventList.getWeightedEvents());
-    TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), std::runtime_error);
+    TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), const std::runtime_error &);
 
     eventList.switchTo(EventType::WEIGHTED_NOTIME);
     target.copyDataFrom(eventList);
     TS_ASSERT_EQUALS(target.getEventType(), EventType::WEIGHTED_NOTIME)
     TS_ASSERT_EQUALS(target.getSortType(), eventList.getSortType());
-    TS_ASSERT_THROWS(target.getEvents(), std::runtime_error);
-    TS_ASSERT_THROWS(target.getWeightedEvents(), std::runtime_error);
+    TS_ASSERT_THROWS(target.getEvents(), const std::runtime_error &);
+    TS_ASSERT_THROWS(target.getWeightedEvents(), const std::runtime_error &);
     TS_ASSERT_EQUALS(target.getWeightedEventsNoTime(),
                      eventList.getWeightedEventsNoTime());
   }
@@ -295,12 +295,12 @@ public:
     this->fake_data();
     TS_ASSERT_EQUALS(el.getEvents().size(), NUMEVENTS);
     TS_ASSERT_EQUALS(el.getNumberEvents(), NUMEVENTS);
-    TS_ASSERT_THROWS(el.getWeightedEvents().size(), std::runtime_error);
-    TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), std::runtime_error);
+    TS_ASSERT_THROWS(el.getWeightedEvents().size(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), const std::runtime_error &);
 
     el.switchTo(WEIGHTED);
-    TS_ASSERT_THROWS(el.getEvents().size(), std::runtime_error);
-    TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), std::runtime_error);
+    TS_ASSERT_THROWS(el.getEvents().size(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), const std::runtime_error &);
     TS_ASSERT_EQUALS(el.getWeightedEvents().size(), NUMEVENTS);
     TS_ASSERT_EQUALS(el.getNumberEvents(), NUMEVENTS);
     TS_ASSERT_EQUALS(el.getEvent(0).weight(), 1.0);
@@ -312,8 +312,8 @@ public:
     // Start with a bit of fake data
     this->fake_data();
     el.switchTo(WEIGHTED_NOTIME);
-    TS_ASSERT_THROWS(el.getEvents().size(), std::runtime_error);
-    TS_ASSERT_THROWS(el.getWeightedEvents().size(), std::runtime_error);
+    TS_ASSERT_THROWS(el.getEvents().size(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.getWeightedEvents().size(), const std::runtime_error &);
     TS_ASSERT_EQUALS(el.getWeightedEventsNoTime().size(), NUMEVENTS);
     TS_ASSERT_EQUALS(el.getNumberEvents(), NUMEVENTS);
     TS_ASSERT_EQUALS(el.getWeightedEventsNoTime()[0].weight(), 1.0);
@@ -596,9 +596,9 @@ public:
 
   void test_divide_by_zero() {
     // Perform the multiply
-    TS_ASSERT_THROWS(el.divide(0.0, 0.5), std::invalid_argument);
-    TS_ASSERT_THROWS(el.divide(0.0), std::invalid_argument);
-    TS_ASSERT_THROWS(el /= 0, std::invalid_argument);
+    TS_ASSERT_THROWS(el.divide(0.0, 0.5), const std::invalid_argument &);
+    TS_ASSERT_THROWS(el.divide(0.0), const std::invalid_argument &);
+    TS_ASSERT_THROWS(el /= 0, const std::invalid_argument &);
   }
 
   //-----------------------------------------------------------------------------------------------
@@ -982,7 +982,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "We don't support WeightedEvents with this feature at present.",
-        eList.generateHistogramPulseTime(X, Y, E), std::runtime_error);
+        eList.generateHistogramPulseTime(X, Y, E), const std::runtime_error &);
   }
 
   void test_histogram_by_time_at_sample_pulse_only() {
@@ -1656,7 +1656,7 @@ public:
 
       if (curType == WEIGHTED_NOTIME) {
         TS_ASSERT_THROWS(el.filterByPulseTime(100, 200, out),
-                         std::runtime_error);
+                         const std::runtime_error &);
       } else {
         TS_ASSERT_THROWS_NOTHING(el.filterByPulseTime(100, 200, out););
 
@@ -1683,7 +1683,7 @@ public:
   }
 
   void test_filterByPulseTime_output_same_as_input_throws() {
-    TS_ASSERT_THROWS(el.filterByPulseTime(100, 200, el), std::invalid_argument);
+    TS_ASSERT_THROWS(el.filterByPulseTime(100, 200, el), const std::invalid_argument &);
   }
 
   void test_filter_by_time_at_sample_behaves_like_filter_by_pulse_time() {
@@ -1705,7 +1705,7 @@ public:
       if (curType == WEIGHTED_NOTIME) {
         TS_ASSERT_THROWS(
             el.filterByTimeAtSample(100, 200, tofFactor, tofOffset, out),
-            std::runtime_error);
+            const std::runtime_error &);
       } else {
         TS_ASSERT_THROWS_NOTHING(
             el.filterByTimeAtSample(100, 200, tofFactor, tofOffset, out););
@@ -1752,7 +1752,7 @@ public:
       if (curType == WEIGHTED_NOTIME) {
         TS_ASSERT_THROWS(el.filterByTimeAtSample(startTEpoch, endTEpoch,
                                                  tofFactor, tofOffset, out),
-                         std::runtime_error);
+                         const std::runtime_error &);
       } else {
         TS_ASSERT_THROWS_NOTHING(el.filterByTimeAtSample(
             startTEpoch, endTEpoch, tofFactor, tofOffset, out););
@@ -1809,7 +1809,7 @@ public:
       if (curType == WEIGHTED_NOTIME) {
         TS_ASSERT_THROWS(el.filterByTimeAtSample(startTEpoch, endTEpoch,
                                                  tofFactor, tofOffset, out),
-                         std::runtime_error);
+                         const std::runtime_error &);
       } else {
         TS_ASSERT_THROWS_NOTHING(el.filterByTimeAtSample(
             startTEpoch, endTEpoch, tofFactor, tofOffset, out););
@@ -1940,7 +1940,7 @@ public:
 
       if (curType == WEIGHTED_NOTIME) {
         // Error cause no time
-        TS_ASSERT_THROWS(el.splitByTime(split, outputs), std::runtime_error);
+        TS_ASSERT_THROWS(el.splitByTime(split, outputs), const std::runtime_error &);
       } else {
         // Do the splitting
         TS_ASSERT_THROWS_NOTHING(el.splitByTime(split, outputs););
@@ -2062,7 +2062,7 @@ public:
     this->fake_uniform_time_data();
     el.switchTo(WEIGHTED_NOTIME);
     TimeSplitterType split;
-    TS_ASSERT_THROWS(el.filterInPlace(split), std::runtime_error)
+    TS_ASSERT_THROWS(el.filterInPlace(split), const std::runtime_error &)
   }
 
   //----------------------------------------------------------------------------------------------
@@ -2159,7 +2159,7 @@ public:
     EventList el_notime = this->fake_data(WEIGHTED_NOTIME);
     TS_ASSERT_THROWS(el_notime.compressFatEvents(10., DateAndTime(0), 10.,
                                                  &el_notime_output),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // integration range
     const double XMIN = 0.;
@@ -2687,10 +2687,10 @@ public:
 
   void test_readYE_throws_without_MRU() {
     const EventList el;
-    TS_ASSERT_THROWS(el.readY(), std::runtime_error);
-    TS_ASSERT_THROWS(el.dataY(), std::runtime_error);
-    TS_ASSERT_THROWS(el.readE(), std::runtime_error);
-    TS_ASSERT_THROWS(el.dataE(), std::runtime_error);
+    TS_ASSERT_THROWS(el.readY(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.dataY(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.readE(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.dataE(), const std::runtime_error &);
   }
 
   void test_counts_works_without_MRU() {
@@ -2703,7 +2703,7 @@ public:
     EventList el;
     el.setHistogram(HistogramData::BinEdges{0, 2});
     TS_ASSERT_THROWS_NOTHING(el.setBinEdges(HistogramData::BinEdges{0, 2}));
-    TS_ASSERT_THROWS(el.setPoints(1), std::runtime_error);
+    TS_ASSERT_THROWS(el.setPoints(1), const std::runtime_error &);
     // Uncertainties for X are always for Points, this must work.
     TS_ASSERT_THROWS_NOTHING(el.setPointVariances(1));
     TS_ASSERT_THROWS_NOTHING(el.setPointStandardDeviations(1));
@@ -2712,31 +2712,31 @@ public:
   void test_setCounts_fails() {
     EventList el;
     el.setHistogram(HistogramData::BinEdges{0, 2});
-    TS_ASSERT_THROWS(el.setCounts(1), std::runtime_error);
-    TS_ASSERT_THROWS(el.setCountVariances(1), std::runtime_error);
-    TS_ASSERT_THROWS(el.setCountStandardDeviations(1), std::runtime_error);
+    TS_ASSERT_THROWS(el.setCounts(1), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.setCountVariances(1), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.setCountStandardDeviations(1), const std::runtime_error &);
   }
 
   void test_setFrequencies_fails() {
     EventList el;
     el.setHistogram(HistogramData::BinEdges{0, 2});
-    TS_ASSERT_THROWS(el.setFrequencies(1), std::runtime_error);
-    TS_ASSERT_THROWS(el.setFrequencyVariances(1), std::runtime_error);
-    TS_ASSERT_THROWS(el.setFrequencyStandardDeviations(1), std::runtime_error);
+    TS_ASSERT_THROWS(el.setFrequencies(1), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.setFrequencyVariances(1), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.setFrequencyStandardDeviations(1), const std::runtime_error &);
   }
 
   void test_setShared_fails() {
     EventList el;
     TS_ASSERT_THROWS_NOTHING(el.setSharedX(el.sharedX()));
-    TS_ASSERT_THROWS(el.setSharedY(el.sharedY()), std::runtime_error);
-    TS_ASSERT_THROWS(el.setSharedE(el.sharedE()), std::runtime_error);
+    TS_ASSERT_THROWS(el.setSharedY(el.sharedY()), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.setSharedE(el.sharedE()), const std::runtime_error &);
   }
 
   void test_mutable_access_fails() {
     EventList el;
     TS_ASSERT_THROWS_NOTHING(el.mutableX());
-    TS_ASSERT_THROWS(el.mutableY(), std::runtime_error);
-    TS_ASSERT_THROWS(el.mutableE(), std::runtime_error);
+    TS_ASSERT_THROWS(el.mutableY(), const std::runtime_error &);
+    TS_ASSERT_THROWS(el.mutableE(), const std::runtime_error &);
   }
 
   void test_histogram() {
@@ -2772,9 +2772,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(el.setHistogram(histogram));
     TS_ASSERT_EQUALS(el.sharedX(), histogram.sharedX());
     histogram.setCounts(2);
-    TS_ASSERT_THROWS(el.setHistogram(histogram), std::runtime_error);
+    TS_ASSERT_THROWS(el.setHistogram(histogram), const std::runtime_error &);
     HistogramData::Histogram points(HistogramData::Points{0, 2});
-    TS_ASSERT_THROWS(el.setHistogram(points), std::runtime_error);
+    TS_ASSERT_THROWS(el.setHistogram(points), const std::runtime_error &);
   }
 
   void test_YMode() {
@@ -2788,7 +2788,7 @@ public:
     h.setYMode(HistogramData::Histogram::YMode::Counts);
     TS_ASSERT_THROWS_NOTHING(e.setHistogram(h));
     h.setYMode(HistogramData::Histogram::YMode::Frequencies);
-    TS_ASSERT_THROWS(e.setHistogram(h), std::runtime_error);
+    TS_ASSERT_THROWS(e.setHistogram(h), const std::runtime_error &);
   }
 
   void test_setHistogram_preserves_YMode_when_setting_uninitialized() {
diff --git a/Framework/DataObjects/test/EventWorkspaceTest.h b/Framework/DataObjects/test/EventWorkspaceTest.h
index 288b72434085c991730d3b8bdfdc68e2a28cf087..6cc033531ac0eda7d8b78108fdaa7a98c07d3a01 100644
--- a/Framework/DataObjects/test/EventWorkspaceTest.h
+++ b/Framework/DataObjects/test/EventWorkspaceTest.h
@@ -157,7 +157,7 @@ public:
 
     // set the first histogram to have 2 bins
     ew->getSpectrum(0).setHistogram(BinEdges({0., 10., 20.}));
-    TS_ASSERT_THROWS(ew->blocksize(), std::logic_error);
+    TS_ASSERT_THROWS(ew->blocksize(), const std::logic_error &);
     TS_ASSERT(!(ew->isCommonBins()));
     TS_ASSERT_EQUALS(ew->size(), 501);
   }
@@ -242,20 +242,20 @@ public:
     TS_ASSERT_EQUALS(el5.getNumberEvents(), 55);
 
     // Out of range
-    TS_ASSERT_THROWS(uneven->dataX(-3), std::range_error);
-    TS_ASSERT_THROWS(uneven->dataX(NUMPIXELS / 10), std::range_error);
+    TS_ASSERT_THROWS(uneven->dataX(-3), const std::range_error &);
+    TS_ASSERT_THROWS(uneven->dataX(NUMPIXELS / 10), const std::range_error &);
   }
 
   void test_data_access() {
     // Non-const access throws errors for Y & E - not for X
     TS_ASSERT_THROWS_NOTHING(ew->dataX(1));
-    TS_ASSERT_THROWS(ew->dataY(2), NotImplementedError);
-    TS_ASSERT_THROWS(ew->dataE(3), NotImplementedError);
+    TS_ASSERT_THROWS(ew->dataY(2), const NotImplementedError &);
+    TS_ASSERT_THROWS(ew->dataE(3), const NotImplementedError &);
     // Out of range
-    TS_ASSERT_THROWS(ew->dataX(-123), std::range_error);
-    TS_ASSERT_THROWS(ew->dataX(5123), std::range_error);
-    TS_ASSERT_THROWS(ew->dataE(5123), NotImplementedError);
-    TS_ASSERT_THROWS(ew->dataY(5123), NotImplementedError);
+    TS_ASSERT_THROWS(ew->dataX(-123), const std::range_error &);
+    TS_ASSERT_THROWS(ew->dataX(5123), const std::range_error &);
+    TS_ASSERT_THROWS(ew->dataE(5123), const NotImplementedError &);
+    TS_ASSERT_THROWS(ew->dataY(5123), const NotImplementedError &);
 
     // Can't try the const access; copy constructors are not allowed.
   }
@@ -419,7 +419,7 @@ public:
     MantidVec X, Y, E;
     TSM_ASSERT_THROWS("Number of histograms is out of range, should throw",
                       ws->generateHistogramPulseTime(nHistos + 1, X, Y, E),
-                      std::range_error);
+                      const std::range_error &);
   }
 
   void do_test_binning(EventWorkspace_sptr ws, const BinEdges &axis,
diff --git a/Framework/DataObjects/test/FakeMDTest.h b/Framework/DataObjects/test/FakeMDTest.h
index 30237c0695bac52c43aa4754146eb78f56987f71..b0764fe5c817c03657cf6605e7bdc1c1a7f48a66 100644
--- a/Framework/DataObjects/test/FakeMDTest.h
+++ b/Framework/DataObjects/test/FakeMDTest.h
@@ -37,7 +37,7 @@ public:
 
     TS_ASSERT_THROWS(
         FakeMD(uniformParams, peakParams, randomSeed, randomizeSignal),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   //---------------------------------------------------------------------------
diff --git a/Framework/DataObjects/test/Histogram1DTest.h b/Framework/DataObjects/test/Histogram1DTest.h
index 1c4685de5473b04921a41f5e125b91d40d8e3709..0efe0bf5200fdc96744d9cf21677281e7c884578 100644
--- a/Framework/DataObjects/test/Histogram1DTest.h
+++ b/Framework/DataObjects/test/Histogram1DTest.h
@@ -105,7 +105,7 @@ public:
   void testcheckAndSanitizeHistogramThrowsNullY() {
     Histogram1D h{Histogram::XMode::Points, Histogram::YMode::Counts};
     BinEdges edges{-0.04, 1.7};
-    TS_ASSERT_THROWS(h.setHistogram(edges), std::invalid_argument);
+    TS_ASSERT_THROWS(h.setHistogram(edges), const std::invalid_argument &);
   }
 
   void testcheckAndSanitizeHistogramThrowsNullE() {
@@ -114,7 +114,7 @@ public:
     Histogram histogram{edges};
     Counts counts{23};
     histogram.setCounts(counts);
-    TS_ASSERT_THROWS(h.setHistogram(histogram), std::invalid_argument);
+    TS_ASSERT_THROWS(h.setHistogram(histogram), const std::invalid_argument &);
   }
 
   void testsetgetXvector() {
@@ -171,16 +171,16 @@ public:
   }
   void testrangeexceptionX() {
     h.setPoints(x1);
-    TS_ASSERT_THROWS(h.dataX().at(nel), std::out_of_range);
+    TS_ASSERT_THROWS(h.dataX().at(nel), const std::out_of_range &);
   }
   void testrangeexceptionY() {
     h.setCounts(y1);
-    TS_ASSERT_THROWS(h.dataY().at(nel), std::out_of_range);
+    TS_ASSERT_THROWS(h.dataY().at(nel), const std::out_of_range &);
   }
   void testrangeexceptionE() {
     h.setCounts(y1);
     h.setCountStandardDeviations(e1);
-    TS_ASSERT_THROWS(h.dataE().at(nel), std::out_of_range);
+    TS_ASSERT_THROWS(h.dataE().at(nel), const std::out_of_range &);
   }
 
   void test_copy_constructor() {
diff --git a/Framework/DataObjects/test/MDBoxBaseTest.h b/Framework/DataObjects/test/MDBoxBaseTest.h
index 6ec1cec6adabc8688b132e599098a99012f08b58..85c7d194ea4631ca269a4c358e4c62520a259e86 100644
--- a/Framework/DataObjects/test/MDBoxBaseTest.h
+++ b/Framework/DataObjects/test/MDBoxBaseTest.h
@@ -266,7 +266,7 @@ public:
     TS_ASSERT_DELTA(b.getExtents(1).getMin(), -4.0, 1e-6);
     TS_ASSERT_DELTA(b.getExtents(1).getMax(), +12.0, 1e-6);
 
-    TS_ASSERT_THROWS(b.setExtents(2, 0, 1.0), std::invalid_argument);
+    TS_ASSERT_THROWS(b.setExtents(2, 0, 1.0), const std::invalid_argument &);
 
     coord_t center[2];
     b.getCenter(center);
diff --git a/Framework/DataObjects/test/MDBoxFlatTreeTest.h b/Framework/DataObjects/test/MDBoxFlatTreeTest.h
index d24913d1e6651adeab53c9646ba376129e7b785a..3fde6195a08df76a834cb5c21e2c5193affef8e4 100644
--- a/Framework/DataObjects/test/MDBoxFlatTreeTest.h
+++ b/Framework/DataObjects/test/MDBoxFlatTreeTest.h
@@ -52,7 +52,7 @@ public:
         "Should throw as the box data were written for lean event and now we "
         "try to retrieve full events",
         BoxStoredTree.loadBoxStructure("someFile.nxs", nDims, "MDEvent"),
-        std::runtime_error);
+        const std::runtime_error &);
 
     nDims = 0;
     TSM_ASSERT_THROWS_NOTHING(
diff --git a/Framework/DataObjects/test/MDBoxTest.h b/Framework/DataObjects/test/MDBoxTest.h
index 2eb3169b817a64706a7364b9cca2e1675b4879e8..ac10602c6bf5d8dc3ecf0596ea32ce625bd94509 100644
--- a/Framework/DataObjects/test/MDBoxTest.h
+++ b/Framework/DataObjects/test/MDBoxTest.h
@@ -380,7 +380,7 @@ public:
     sc->setSplitThreshold(10);
     using MACROS_ARE_DUMB =
         MDBox<MDLeanEvent<3>, 3>; //...since they get confused by commas
-    TS_ASSERT_THROWS(MACROS_ARE_DUMB b3(sc.get()), std::invalid_argument);
+    TS_ASSERT_THROWS(MACROS_ARE_DUMB b3(sc.get()), const std::invalid_argument &);
   }
 
   void test_splitter() {
diff --git a/Framework/DataObjects/test/MDEventFactoryTest.h b/Framework/DataObjects/test/MDEventFactoryTest.h
index 6d82f9a8ed7897c8b57a65383f97dc82abcae48a..89a93b9c9068dadbfcf57597dfc299f31051233c 100644
--- a/Framework/DataObjects/test/MDEventFactoryTest.h
+++ b/Framework/DataObjects/test/MDEventFactoryTest.h
@@ -42,7 +42,7 @@ public:
                       ew->displayNormalizationHisto(), histoNormalization);
 
     TS_ASSERT_THROWS(ew = MDEventFactory::CreateMDWorkspace(0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_box_factory() {
@@ -84,10 +84,10 @@ public:
 
     TS_ASSERT_THROWS(MDEventFactory::createBox(
                          0, MDEventFactory::BoxType::MDBoxWithLean, bc),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(MDEventFactory::createBox(
                          10, MDEventFactory::BoxType::MDGridBoxWithFat, bc),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   // Templated function that will be called for a specific MDEW
diff --git a/Framework/DataObjects/test/MDEventTest.h b/Framework/DataObjects/test/MDEventTest.h
index 16f522ee836dba99b3d01a54788ba5ac27c9a0da..0af05444d2687d437d98d041be672476f0cd1415 100644
--- a/Framework/DataObjects/test/MDEventTest.h
+++ b/Framework/DataObjects/test/MDEventTest.h
@@ -120,7 +120,7 @@ public:
 
     std::vector<MDLeanEvent<4>> transfEvents4;
     TS_ASSERT_THROWS(MDLeanEvent<4>::dataToEvents(data, transfEvents4),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     std::vector<MDLeanEvent<3>> transfEvents;
     TS_ASSERT_THROWS_NOTHING(MDLeanEvent<3>::dataToEvents(data, transfEvents));
@@ -199,7 +199,7 @@ public:
 
     std::vector<MDEvent<3>> transfEvents3;
     TS_ASSERT_THROWS(MDEvent<3>::dataToEvents(data, transfEvents3),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     std::vector<MDEvent<4>> transfEvents;
     TS_ASSERT_THROWS_NOTHING(MDEvent<4>::dataToEvents(data, transfEvents));
diff --git a/Framework/DataObjects/test/MDEventWorkspaceTest.h b/Framework/DataObjects/test/MDEventWorkspaceTest.h
index 09875999ec9ec0c095ff718d8328b3685456887c..d4e089100217e8cc5ee6157a19db6d82e820e58e 100644
--- a/Framework/DataObjects/test/MDEventWorkspaceTest.h
+++ b/Framework/DataObjects/test/MDEventWorkspaceTest.h
@@ -172,18 +172,18 @@ public:
   void test_initialize_throws() {
     IMDEventWorkspace *ew = new MDEventWorkspace<MDLeanEvent<3>, 3>();
     Mantid::Geometry::GeneralFrame frame("m", "m");
-    TS_ASSERT_THROWS(ew->initialize(), std::runtime_error);
+    TS_ASSERT_THROWS(ew->initialize(), const std::runtime_error &);
     for (size_t i = 0; i < 5; i++)
       ew->addDimension(MDHistoDimension_sptr(
           new MDHistoDimension("x", "x", frame, -1, 1, 0)));
-    TS_ASSERT_THROWS(ew->initialize(), std::runtime_error);
+    TS_ASSERT_THROWS(ew->initialize(), const std::runtime_error &);
     delete ew;
   }
 
   void test_initialize() {
     IMDEventWorkspace *ew = new MDEventWorkspace<MDLeanEvent<3>, 3>();
     Mantid::Geometry::GeneralFrame frame("m", "m");
-    TS_ASSERT_THROWS(ew->initialize(), std::runtime_error);
+    TS_ASSERT_THROWS(ew->initialize(), const std::runtime_error &);
     for (size_t i = 0; i < 3; i++)
       ew->addDimension(MDHistoDimension_sptr(
           new MDHistoDimension("x", "x", frame, -1, 1, 0)));
diff --git a/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h b/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h
index 8ce8f3591f1cc909b6bdc2b7e2cbce9f0540952c..355ecfa0a21e494148fa3c369f1c00eed0c608fa 100644
--- a/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h
+++ b/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h
@@ -34,7 +34,7 @@ public:
     // Act + Assert
     TSM_ASSERT_THROWS(
         "Should throw as only MDEvent and MDHisto workspaces are allowed",
-        converter(ws.get()), std::invalid_argument);
+        converter(ws.get()), const std::invalid_argument &);
   }
 
   void test_that_throws_for_non_uniform_Q_coodinate_system() {
@@ -55,7 +55,7 @@ public:
     // Act + Assert
     TSM_ASSERT_THROWS(
         "Should throw as coordinate system is mixed with several Q types.",
-        converter(ws.get()), std::invalid_argument);
+        converter(ws.get()), const std::invalid_argument &);
   }
 
   void test_that_doesn_not_throw_for_non_uniform_Q_coodinate_system() {
diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h
index 850a91086f1055c421816d5a04f27b85534de439..107b3314773838760a01634c9f5f13af322f7db8 100644
--- a/Framework/DataObjects/test/MDGridBoxTest.h
+++ b/Framework/DataObjects/test/MDGridBoxTest.h
@@ -452,7 +452,7 @@ public:
 
     std::vector<coord_t> cenroid(2, 0);
     TS_ASSERT_THROWS(superbox->calculateCentroid(&cenroid[0]),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     // Check the centroid for these 3 events
     // TS_ASSERT_DELTA( cenroid[0], 3.233, 0.001);
diff --git a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h
index 715b776a8baaf5790ce2d21bbab30ab1c682b497..1677b3e4e1f16d85b5c1207ad902df7f063d9c3f 100644
--- a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h
+++ b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h
@@ -1493,7 +1493,7 @@ public:
     bool maskDim[] = {true};
     TSM_ASSERT_THROWS("Not implemented yet, should throw",
                       it->getVertexesArray(numVertexes, outDimensions, maskDim),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   void test_getIsMasked() {
diff --git a/Framework/DataObjects/test/MaskWorkspaceTest.h b/Framework/DataObjects/test/MaskWorkspaceTest.h
index 68f0f12b0fcd042396a37aab3de2d024b222089b..6b488faaff69161ab5f2ffdd0f8c02d07e9b5f69 100644
--- a/Framework/DataObjects/test/MaskWorkspaceTest.h
+++ b/Framework/DataObjects/test/MaskWorkspaceTest.h
@@ -28,8 +28,8 @@ public:
     Mantid::DataObjects::MaskWorkspace maskWS(nDetectors);
     TS_ASSERT_EQUALS(maskWS.getNumberHistograms(), nDetectors);
     TS_ASSERT_EQUALS(maskWS.blocksize(), 1);
-    TS_ASSERT_THROWS(maskWS.getNumberMasked(), std::runtime_error);
-    TS_ASSERT_THROWS(maskWS.isMasked(0), std::runtime_error);
+    TS_ASSERT_THROWS(maskWS.getNumberMasked(), const std::runtime_error &);
+    TS_ASSERT_THROWS(maskWS.isMasked(0), const std::runtime_error &);
     TS_ASSERT_EQUALS(maskWS.isMaskedIndex(0), false);
     maskWS.setMaskedIndex(0);
     TS_ASSERT_EQUALS(maskWS.isMaskedIndex(0), true);
diff --git a/Framework/DataObjects/test/PeakColumnTest.h b/Framework/DataObjects/test/PeakColumnTest.h
index 758d16d623313cf7e4c81921fd8c29e77657b88c..7d31089ad196bd7ff155ebb37eb661f5a5898b17 100644
--- a/Framework/DataObjects/test/PeakColumnTest.h
+++ b/Framework/DataObjects/test/PeakColumnTest.h
@@ -50,7 +50,8 @@ public:
   }
 
   void test_constructor_throws_given_unknown_name() {
-    TS_ASSERT_THROWS(PeakColumn(m_peaks, "NotPeakColumn"), std::runtime_error);
+    TS_ASSERT_THROWS(PeakColumn(m_peaks, "NotPeakColumn"),
+                     const std::runtime_error &);
   }
 
   void test_clone() {
@@ -84,19 +85,19 @@ public:
   void test_PeakColumn_Cannot_Be_Resized() {
     PeakColumnTestHelper pc(m_peaks, "DetID");
     TS_ASSERT_THROWS(pc.resize(10),
-                     Mantid::Kernel::Exception::NotImplementedError);
+                     const Mantid::Kernel::Exception::NotImplementedError &);
   }
 
   void test_Row_Cannot_Be_Inserted_Into_PeakColumn() {
     PeakColumnTestHelper pc(m_peaks, "DetID");
     TS_ASSERT_THROWS(pc.insert(0),
-                     Mantid::Kernel::Exception::NotImplementedError);
+                     const Mantid::Kernel::Exception::NotImplementedError &);
   }
 
   void test_Row_Cannot_Be_Removed_From_PeakColumn() {
     PeakColumnTestHelper pc(m_peaks, "DetID");
     TS_ASSERT_THROWS(pc.remove(0),
-                     Mantid::Kernel::Exception::NotImplementedError);
+                     const Mantid::Kernel::Exception::NotImplementedError &);
   }
 
   void test_cell_returns_correct_value_from_PeakColumn() {
diff --git a/Framework/DataObjects/test/RefAxisTest.h b/Framework/DataObjects/test/RefAxisTest.h
index b2e6bcbf9c35a29c5f179b1d3fd0c1bd30e406d5..bdabefe79feb5f37541b07d1313ec8aabb18d07e 100644
--- a/Framework/DataObjects/test/RefAxisTest.h
+++ b/Framework/DataObjects/test/RefAxisTest.h
@@ -57,7 +57,7 @@ public:
     TS_ASSERT(m_refAxis->isNumeric())
     TS_ASSERT(!m_refAxis->isSpectra())
     TS_ASSERT_EQUALS(m_refAxis->unit()->unitID(), "TOF")
-    TS_ASSERT_THROWS(m_refAxis->spectraNo(0), std::domain_error)
+    TS_ASSERT_THROWS(m_refAxis->spectraNo(0), const std::domain_error &)
   }
 
   void testClone() {
@@ -68,7 +68,7 @@ public:
     TS_ASSERT_EQUALS(clonedAxis->unit()->unitID(), "TOF")
     TS_ASSERT(clonedAxis->isNumeric())
     TS_ASSERT_EQUALS((*clonedAxis)(0, 0), 1.0)
-    TS_ASSERT_THROWS((*clonedAxis)(0, 1), std::range_error)
+    TS_ASSERT_THROWS((*clonedAxis)(0, 1), const std::range_error &)
   }
 
   void testCloneDifferentLength() {
@@ -87,24 +87,24 @@ public:
     TS_ASSERT_EQUALS((*m_refAxis)(0, 2), 10.1)
     TS_ASSERT_EQUALS((*m_refAxis)(2, 0), 2.1)
 
-    TS_ASSERT_THROWS((*m_refAxis)(-1, 0), Exception::IndexError)
-    TS_ASSERT_THROWS((*m_refAxis)(5, 0), Exception::IndexError)
-    TS_ASSERT_THROWS((*m_refAxis)(0, -1), std::range_error)
-    TS_ASSERT_THROWS((*m_refAxis)(0, 5), std::range_error)
+    TS_ASSERT_THROWS((*m_refAxis)(-1, 0), const Exception::IndexError &)
+    TS_ASSERT_THROWS((*m_refAxis)(5, 0), const Exception::IndexError &)
+    TS_ASSERT_THROWS((*m_refAxis)(0, -1), const std::range_error &)
+    TS_ASSERT_THROWS((*m_refAxis)(0, 5), const std::range_error &)
   }
 
   void testSetValue() {
-    TS_ASSERT_THROWS(m_refAxis->setValue(0, 9.9), std::domain_error)
+    TS_ASSERT_THROWS(m_refAxis->setValue(0, 9.9), const std::domain_error &)
   }
 
   void testGetMin() {
     std::unique_ptr<Axis> newRefAxis(m_refAxis->clone(5, m_space2.get()));
-    TS_ASSERT_THROWS(newRefAxis->getMin(), std::runtime_error)
+    TS_ASSERT_THROWS(newRefAxis->getMin(), const std::runtime_error &)
   }
 
   void testGetMax() {
     std::unique_ptr<Axis> newRefAxis(m_refAxis->clone(5, m_space2.get()));
-    TS_ASSERT_THROWS(newRefAxis->getMax(), std::runtime_error)
+    TS_ASSERT_THROWS(newRefAxis->getMax(), const std::runtime_error &)
   }
 
 private:
diff --git a/Framework/DataObjects/test/TableWorkspaceTest.h b/Framework/DataObjects/test/TableWorkspaceTest.h
index 3896698cbdd0b49d14cc33b577fa607c4aff93bd..a96cbe477ee2dd847101ca671e8e9b81fab4f793 100644
--- a/Framework/DataObjects/test/TableWorkspaceTest.h
+++ b/Framework/DataObjects/test/TableWorkspaceTest.h
@@ -118,7 +118,8 @@ public:
     TS_ASSERT_EQUALS(tw.getColumn("Name"), strCol);
     TS_ASSERT_EQUALS(tw.getColumn("Position"), v3dCol);
     // Test trying to add existing column returns null pointer
-    TS_ASSERT_THROWS(tw.addColumn("int", "Number"), std::invalid_argument);
+    TS_ASSERT_THROWS(tw.addColumn("int", "Number"),
+                     const std::invalid_argument &);
 
     tw.getRef<int>("Number", 1) = 17;
     tw.cell<std::string>(2, 1) = "STRiNG";
@@ -214,13 +215,13 @@ public:
     TableWorkspace tw(2);
     tw.addColumn("str", "Name");
     tw.addColumn("int", "Number");
-    TS_ASSERT_THROWS(tw.String(0, 1), std::runtime_error);
-    TS_ASSERT_THROWS(tw.Int(0, 3), std::range_error);
-    TS_ASSERT_THROWS(tw.Int(3, 1), std::range_error);
+    TS_ASSERT_THROWS(tw.String(0, 1), const std::runtime_error &);
+    TS_ASSERT_THROWS(tw.Int(0, 3), const std::range_error &);
+    TS_ASSERT_THROWS(tw.Int(3, 1), const std::range_error &);
 
     {
       TableRow row = tw.appendRow();
-      TS_ASSERT_THROWS(row << "One" << 1 << 2, std::range_error);
+      TS_ASSERT_THROWS(row << "One" << 1 << 2, const std::range_error &);
     }
 
     {
@@ -228,12 +229,12 @@ public:
       int i;
       double d;
       TableRow row = tw.getFirstRow();
-      TS_ASSERT_THROWS(row >> str >> i >> d, std::range_error);
+      TS_ASSERT_THROWS(row >> str >> i >> d, const std::range_error &);
     }
 
     {
       TableRow row = tw.getFirstRow();
-      TS_ASSERT_THROWS(row.row(3), std::range_error);
+      TS_ASSERT_THROWS(row.row(3), const std::range_error &);
     }
   }
 
@@ -378,7 +379,8 @@ public:
     TS_ASSERT_EQUALS(d, 0.0);
     TS_ASSERT_THROWS_NOTHING(d = tw.getColumn("T")->toDouble(0));
     TS_ASSERT_EQUALS(d, 1.0);
-    TS_ASSERT_THROWS(d = tw.getColumn("S")->toDouble(0), std::invalid_argument);
+    TS_ASSERT_THROWS(d = tw.getColumn("S")->toDouble(0),
+                     const std::invalid_argument &);
   }
   void testGetVectorSetVectorValues() {
 
@@ -388,7 +390,8 @@ public:
     tw.addColumn("str", "String");
 
     auto &SizeTData = tw.getColVector<size_t>("SizeT");
-    TS_ASSERT_THROWS(tw.getColVector<int>("Double"), std::runtime_error);
+    TS_ASSERT_THROWS(tw.getColVector<int>("Double"),
+                     const std::runtime_error &);
     std::vector<double> &DoublData = tw.getColVector<double>("Double");
     std::vector<std::string> &StrData = tw.getColVector<std::string>("String");
 
@@ -404,7 +407,7 @@ public:
     StrData[2] = "3";
 
     auto SizeTDataI = tw.getColVector<size_t>(0);
-    TS_ASSERT_THROWS(tw.getColVector<int>(1), std::runtime_error);
+    TS_ASSERT_THROWS(tw.getColVector<int>(1), const std::runtime_error &);
     auto DoublDataI = tw.getColVector<double>(1);
     auto StrDataI = tw.getColVector<std::string>(2);
 
diff --git a/Framework/DataObjects/test/VectorColumnTest.h b/Framework/DataObjects/test/VectorColumnTest.h
index 7547ec43315123b4ae6f0d65635ad427250efad2..3f127fd71f360bbd3e7c84c75a1895efcec78068 100644
--- a/Framework/DataObjects/test/VectorColumnTest.h
+++ b/Framework/DataObjects/test/VectorColumnTest.h
@@ -69,7 +69,7 @@ public:
     TS_ASSERT_EQUALS(col.cell<std::vector<int>>(4), v4);
 
     // Non-convertable characters
-    TS_ASSERT_THROWS(col.read(4, "1,2,a,3"), std::invalid_argument);
+    TS_ASSERT_THROWS(col.read(4, "1,2,a,3"), const std::invalid_argument &);
   }
 
   void test_print() {
diff --git a/Framework/DataObjects/test/Workspace2DTest.h b/Framework/DataObjects/test/Workspace2DTest.h
index c9494d4cb817b62c1884d39b6765b0bde2599a93..4d20342d65570b3a7813d968cab3b1eb5977ac0b 100644
--- a/Framework/DataObjects/test/Workspace2DTest.h
+++ b/Framework/DataObjects/test/Workspace2DTest.h
@@ -26,8 +26,8 @@ using namespace Mantid::Geometry;
 using namespace Mantid::HistogramData;
 using namespace Mantid::Kernel;
 using namespace Mantid::API;
-using HistogramData::CountStandardDeviations;
 using HistogramData::Counts;
+using HistogramData::CountStandardDeviations;
 using HistogramData::LinearGenerator;
 using WorkspaceCreationHelper::create2DWorkspaceBinned;
 
@@ -90,7 +90,7 @@ public:
     // mess with the binning and the results change
     Workspace2D_sptr cloned(ws->clone());
     cloned->setHistogram(0, Points(0), Counts(0));
-    TS_ASSERT_THROWS(cloned->blocksize(), std::logic_error);
+    TS_ASSERT_THROWS(cloned->blocksize(), const std::logic_error &);
     TS_ASSERT(!(cloned->isCommonBins()));
     TS_ASSERT_EQUALS(cloned->size(), 45);
   }
@@ -103,8 +103,8 @@ public:
         nbins + 1, LinearGenerator(aNumber, 1.0));
     TS_ASSERT_THROWS_NOTHING(ws->setX(0, v));
     TS_ASSERT_EQUALS(ws->dataX(0)[0], aNumber);
-    TS_ASSERT_THROWS(ws->setX(-1, v), std::range_error);
-    TS_ASSERT_THROWS(ws->setX(nhist + 5, v), std::range_error);
+    TS_ASSERT_THROWS(ws->setX(-1, v), const std::range_error &);
+    TS_ASSERT_THROWS(ws->setX(nhist + 5, v), const std::range_error &);
   }
 
   void testSetX_cowptr() {
@@ -113,8 +113,8 @@ public:
         nbins + 1, LinearGenerator(aNumber, 1.0));
     TS_ASSERT_THROWS_NOTHING(ws->setX(0, v));
     TS_ASSERT_EQUALS(ws->dataX(0)[0], aNumber);
-    TS_ASSERT_THROWS(ws->setX(-1, v), std::range_error);
-    TS_ASSERT_THROWS(ws->setX(nhist + 5, v), std::range_error);
+    TS_ASSERT_THROWS(ws->setX(-1, v), const std::range_error &);
+    TS_ASSERT_THROWS(ws->setX(nhist + 5, v), const std::range_error &);
   }
 
   void testSetCounts_cowptr() {
diff --git a/Framework/DataObjects/test/WorkspaceCreationTest.h b/Framework/DataObjects/test/WorkspaceCreationTest.h
index a7fe8b94993a82c5df0908200f969f18960ede5f..6f544def3ecf9fda326c603691f6767f4bba7298 100644
--- a/Framework/DataObjects/test/WorkspaceCreationTest.h
+++ b/Framework/DataObjects/test/WorkspaceCreationTest.h
@@ -244,7 +244,7 @@ public:
     // No instrument, so spectrum definitions created by make_indices are bad.
     TS_ASSERT_THROWS(
         create<Workspace2D>(make_indices(), Histogram(BinEdges{1, 2, 4})),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_create_Instrument_size_Histogram() {
@@ -397,7 +397,7 @@ public:
     // make_indices are bad.
     TS_ASSERT_THROWS(
         create<Workspace2D>(*parent, make_indices(), (BinEdges{1, 2, 4})),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_create_parent_IndexInfo() {
diff --git a/Framework/DataObjects/test/WorkspaceValidatorsTest.h b/Framework/DataObjects/test/WorkspaceValidatorsTest.h
index 797119ee226623110cbbd5feb0e35559b1e90fdf..af3a2a623b0a6bf5fb8ddc10e65789668b094967 100644
--- a/Framework/DataObjects/test/WorkspaceValidatorsTest.h
+++ b/Framework/DataObjects/test/WorkspaceValidatorsTest.h
@@ -165,7 +165,7 @@ public:
     ;
 
     // fine and no unit
-    TS_ASSERT_THROWS(wsp1 = ws1, std::invalid_argument);
+    TS_ASSERT_THROWS(wsp1 = ws1, const std::invalid_argument &);
 
     TS_ASSERT_EQUALS(wsp1.setValue(""),
                      "Enter a name for the Input/InOut workspace");
diff --git a/Framework/Geometry/test/BasicHKLFiltersTest.h b/Framework/Geometry/test/BasicHKLFiltersTest.h
index 65381551ff5ab8dfacab67c184bd37891e8c2cd5..56c4d71f323accf2d8b5b046665d0f9eb52700a3 100644
--- a/Framework/Geometry/test/BasicHKLFiltersTest.h
+++ b/Framework/Geometry/test/BasicHKLFiltersTest.h
@@ -22,9 +22,9 @@
 using namespace Mantid::Geometry;
 using namespace Mantid::Kernel;
 
+using ::testing::_;
 using ::testing::Mock;
 using ::testing::Return;
-using ::testing::_;
 
 class BasicHKLFiltersTest : public CxxTest::TestSuite {
 public:
@@ -39,13 +39,16 @@ public:
     UnitCell cell(10., 10., 10.);
 
     TS_ASSERT_THROWS_NOTHING(HKLFilterDRange dFilter(cell, 1.0));
-    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, -1.0), std::range_error);
-    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, 0.0), std::range_error);
+    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, -1.0),
+                     const std::range_error &);
+    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, 0.0),
+                     const std::range_error &);
 
     TS_ASSERT_THROWS_NOTHING(HKLFilterDRange dFilter(cell, 1.0, 2.0));
-    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, 1.0, 0.5), std::range_error);
+    TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, 1.0, 0.5),
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterDRange dFilter(cell, 1.0, -0.5),
-                     std::range_error);
+                     const std::range_error &);
   }
 
   void testHKLFilterDRangeDescription() {
@@ -73,7 +76,8 @@ public:
 
   void testHKLFilterSpaceGroupConstructor() {
     SpaceGroup_const_sptr invalid;
-    TS_ASSERT_THROWS(HKLFilterSpaceGroup sgFilter(invalid), std::runtime_error);
+    TS_ASSERT_THROWS(HKLFilterSpaceGroup sgFilter(invalid),
+                     const std::runtime_error &);
 
     SpaceGroup_const_sptr sg =
         SpaceGroupFactory::Instance().createSpaceGroup("F d -3 m");
@@ -108,7 +112,7 @@ public:
   void testHKLFilterStructureFactorConstructor() {
     StructureFactorCalculator_sptr invalid;
     TS_ASSERT_THROWS(HKLFilterStructureFactor sfFilter(invalid),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     StructureFactorCalculator_sptr mock =
         boost::make_shared<MockStructureFactorCalculator>();
diff --git a/Framework/Geometry/test/BoundingBoxTest.h b/Framework/Geometry/test/BoundingBoxTest.h
index f722c314eecb6a68d5643608285eb341bacb7ee5..22f3ddef890aafb7f4041b4cd43798a77df27db5 100644
--- a/Framework/Geometry/test/BoundingBoxTest.h
+++ b/Framework/Geometry/test/BoundingBoxTest.h
@@ -46,13 +46,13 @@ public:
   test_That_Construction_With_An_Invalid_Point_Does_Not_Create_A_Bounding_Box() {
     // xmax < xmin
     TS_ASSERT_THROWS(BoundingBox(1.0, 4.0, 5.0, 3.0, 2.0, 3.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // ymax < ymin
     TS_ASSERT_THROWS(BoundingBox(1.0, 0.5, 5.0, 3.0, 2.0, 3.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // zmax < zmin
     TS_ASSERT_THROWS(BoundingBox(1.0, 4.0, 5.0, 3.0, 2.0, 6.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_That_Default_Construction_Gives_A_Null_Bounding_Box() {
@@ -284,9 +284,9 @@ public:
 
     TS_ASSERT_THROWS(
         bbox.doesLineIntersect(V3D(-5.0, -1.0, 0.0), V3D(1.0, 1.0, 0.0)),
-        Kernel::Exception::NotImplementedError);
+        const Kernel::Exception::NotImplementedError &);
     TS_ASSERT_THROWS(bbox.isPointInside(V3D(-5.0, -1.0, 0.0)),
-                     Kernel::Exception::NotImplementedError);
+                     const Kernel::Exception::NotImplementedError &);
   }
   void testBBAlignedToNewCoordinateSystemWorksCorrect() {
     BoundingBox bbox(3.0, 4.0, 5.5, 1.0, 1.0, 1.5);
diff --git a/Framework/Geometry/test/CSGObjectTest.h b/Framework/Geometry/test/CSGObjectTest.h
index 4c40de5b413ba69878c6407773fe3bc1aed1b8fd..6bb842b3c7f597d2f9893f20637c34378cce5fcb 100644
--- a/Framework/Geometry/test/CSGObjectTest.h
+++ b/Framework/Geometry/test/CSGObjectTest.h
@@ -873,7 +873,7 @@ public:
     auto shell = ComponentCreationHelper::createHollowShell(0.5, 1.0);
     constexpr size_t maxAttempts{1};
     TS_ASSERT_THROWS(shell->generatePointInObject(rng, maxAttempts),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testGeneratePointInsideRespectsActiveRegion() {
@@ -1125,7 +1125,7 @@ public:
 
   void testVolumeThrowsWhenBoundingBoxIsInvalid() {
     CSGObject shape("This text gives an invalid Object.");
-    TS_ASSERT_THROWS(shape.volume(), std::runtime_error);
+    TS_ASSERT_THROWS(shape.volume(), const std::runtime_error &);
   }
 
   void testGetBoundingBoxForCylinder()
@@ -1219,7 +1219,7 @@ public:
     xmin = 3.0;
     TS_ASSERT_THROWS(
         geom_obj->defineBoundingBox(xmax, ymax, zmax, xmin, ymin, zmin),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
   void testSurfaceTriangulation()
   /**
diff --git a/Framework/Geometry/test/CenteringGroupTest.h b/Framework/Geometry/test/CenteringGroupTest.h
index 4f7787006799f08ae151d61af71fe9bd0e83b844..7258c8cb30d97ad77e25609d33f30685e97771be 100644
--- a/Framework/Geometry/test/CenteringGroupTest.h
+++ b/Framework/Geometry/test/CenteringGroupTest.h
@@ -53,8 +53,8 @@ public:
   }
 
   void testInvalidCentering() {
-    TS_ASSERT_THROWS(CenteringGroup group("G"), std::invalid_argument);
-    TS_ASSERT_THROWS(CenteringGroup group("f"), std::invalid_argument);
+    TS_ASSERT_THROWS(CenteringGroup group("G"), const std::invalid_argument &);
+    TS_ASSERT_THROWS(CenteringGroup group("f"), const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Geometry/test/CompAssemblyTest.h b/Framework/Geometry/test/CompAssemblyTest.h
index a9690363b1a06cec1cec841bfb5d9b48951fa435..edf52d05d60897cdb52c8dd545f48e44d8443265 100644
--- a/Framework/Geometry/test/CompAssemblyTest.h
+++ b/Framework/Geometry/test/CompAssemblyTest.h
@@ -25,7 +25,7 @@ public:
   void testEmptyConstructor() {
     CompAssembly q;
     TS_ASSERT_EQUALS(q.nelements(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "");
     TS_ASSERT(!q.getParent());
@@ -38,7 +38,7 @@ public:
   void testNameValueConstructor() {
     CompAssembly q("Name");
     TS_ASSERT_EQUALS(q.nelements(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "Name");
     TS_ASSERT(!q.getParent());
@@ -54,7 +54,7 @@ public:
     CompAssembly *q = new CompAssembly("Child", parent);
     TS_ASSERT_EQUALS(q->getName(), "Child");
     TS_ASSERT_EQUALS(q->nelements(), 0);
-    TS_ASSERT_THROWS((*q)[0], std::runtime_error);
+    TS_ASSERT_THROWS((*q)[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(q->getParent());
     TS_ASSERT_EQUALS(q->getParent()->getName(), parent->getName());
@@ -72,7 +72,7 @@ public:
     Component *det2 = new Component("Det2Name");
     Component *det3 = new Component("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.add(det1);
     bank.add(det2);
     bank.add(det3);
@@ -92,11 +92,11 @@ public:
     TS_ASSERT_EQUALS(bank.nelements(), 1);
     // Throws if you try to remove a component that's not in there
     Component *det2 = new Component("Det2Name");
-    TS_ASSERT_THROWS(bank.remove(det2), std::runtime_error);
+    TS_ASSERT_THROWS(bank.remove(det2), const std::runtime_error &);
     delete det2;
     // Works on components that are in the assembly
     TS_ASSERT_EQUALS(bank.remove(det1), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
   }
 
   //-----------------------------------------------------------------------------
@@ -184,7 +184,7 @@ public:
     Component det2("Det2Name");
     Component det3("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.addCopy(&det1);
     bank.addCopy(&det2);
     bank.addCopy(&det3, "ChangedDet3Name");
diff --git a/Framework/Geometry/test/ComponentTest.h b/Framework/Geometry/test/ComponentTest.h
index 48b205492f89a215061bcef67b31e8d51d2be8b4..5f9a194f58a235c5a0f7a5f6b4ecc0b7d5f468c4 100644
--- a/Framework/Geometry/test/ComponentTest.h
+++ b/Framework/Geometry/test/ComponentTest.h
@@ -166,7 +166,7 @@ public:
     Component q("Child", V3D(5, 6, 7), Quat(1, 1, 1, 1), &parent);
 
     TS_ASSERT_THROWS(parent.setDescription("descr"),
-                     Mantid::Kernel::Exception::NotImplementedError);
+                     const Mantid::Kernel::Exception::NotImplementedError &);
 
     ParameterMap_sptr pmap(new ParameterMap());
     pmap->addString(&q, "ChildMessage", "Message from a child");
@@ -294,7 +294,7 @@ public:
 
     // Rotate by angle+axis not implemented yet. Check for exception throw
     TS_ASSERT_THROWS(comp.rotate(45, V3D(1, 1, 1)),
-                     Mantid::Kernel::Exception::NotImplementedError);
+                     const Mantid::Kernel::Exception::NotImplementedError &);
   }
 
   void testRelativeRotate() {
diff --git a/Framework/Geometry/test/CompositeBraggScattererTest.h b/Framework/Geometry/test/CompositeBraggScattererTest.h
index 795608ebb7fddbb30774f492a5f0a24fd3962c2f..2bc75e5107351feaffa38a168b0bce023b272ae4 100644
--- a/Framework/Geometry/test/CompositeBraggScattererTest.h
+++ b/Framework/Geometry/test/CompositeBraggScattererTest.h
@@ -88,7 +88,7 @@ public:
     TS_ASSERT_EQUALS(scatterer->propertyCount(), 1);
 
     TS_ASSERT_EQUALS(scatterer->nScatterers(), oldCount + 1);
-    TS_ASSERT_THROWS(scatterer->getScatterer(2), std::out_of_range);
+    TS_ASSERT_THROWS(scatterer->getScatterer(2), const std::out_of_range &);
   }
 
   void testRemoveScatterer() {
@@ -101,9 +101,9 @@ public:
     TS_ASSERT_EQUALS(scattererCollection->nScatterers(), oldCount - 1);
 
     TS_ASSERT_THROWS(scattererCollection->getScatterer(oldCount - 1),
-                     std::out_of_range);
+                     const std::out_of_range &);
     TS_ASSERT_THROWS(scattererCollection->removeScatterer(10),
-                     std::out_of_range);
+                     const std::out_of_range &);
 
     scattererCollection->removeScatterer(0);
 
diff --git a/Framework/Geometry/test/ContainerTest.h b/Framework/Geometry/test/ContainerTest.h
index 70549e351b7294cd3db18a558db5af3b23337f74..4b74900f05f33735c9c35cdfe08d1800951dc6d8 100644
--- a/Framework/Geometry/test/ContainerTest.h
+++ b/Framework/Geometry/test/ContainerTest.h
@@ -32,7 +32,7 @@ public:
     Container can;
     TS_ASSERT_EQUALS(false, can.hasSampleShape());
     TS_ASSERT_THROWS(can.createSampleShape(Container::ShapeArgs()),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Construction_With_XML_Assumes_XML_For_Can_Itself() {
@@ -105,7 +105,7 @@ public:
     TS_ASSERT_THROWS(can->setSampleShape("<sphere id=\"shape\"> "
                                          "<radius val=\"1.0\" /> "
                                          "</sphere>"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Geometry/test/ConvexPolygonIteratorTest.h b/Framework/Geometry/test/ConvexPolygonIteratorTest.h
index 8423ba9948f4cf7752d70e184558a161112095b7..fa652445df82af8d81f80824ce47c93b7d7777dd 100644
--- a/Framework/Geometry/test/ConvexPolygonIteratorTest.h
+++ b/Framework/Geometry/test/ConvexPolygonIteratorTest.h
@@ -77,7 +77,7 @@ public:
     // so use a pointer instead
     ConvexPolygon::Iterator *iter(nullptr);
     TS_ASSERT_THROWS(iter = new ConvexPolygon::Iterator(invalid),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     delete iter;
   }
 
diff --git a/Framework/Geometry/test/ConvexPolygonTest.h b/Framework/Geometry/test/ConvexPolygonTest.h
index b8f9ca1368ab34d42fb867d8dc3c01ea3e39df19..fc6bae806d78779bb07963a1a0478ef71300f2dd 100644
--- a/Framework/Geometry/test/ConvexPolygonTest.h
+++ b/Framework/Geometry/test/ConvexPolygonTest.h
@@ -122,8 +122,8 @@ public:
   void test_Invalid_Index_Access_Throws_For_At() {
     using Mantid::Kernel::Exception::IndexError;
     ConvexPolygon triangle = makeEquilateralTriangle();
-    TS_ASSERT_THROWS(triangle.at(3), IndexError);
-    TS_ASSERT_THROWS(triangle.at(-1), IndexError);
+    TS_ASSERT_THROWS(triangle.at(3), const IndexError &);
+    TS_ASSERT_THROWS(triangle.at(-1), const IndexError &);
   }
 
 private:
diff --git a/Framework/Geometry/test/GoniometerTest.h b/Framework/Geometry/test/GoniometerTest.h
index bd33d43c6d40f32c0a0392b865accd33a24fc797..b5936cb419b5d84838281a89e32ddd7fba594d45 100644
--- a/Framework/Geometry/test/GoniometerTest.h
+++ b/Framework/Geometry/test/GoniometerTest.h
@@ -37,7 +37,7 @@ public:
     M.identityMatrix();
     TS_ASSERT(!G.isDefined());
     TS_ASSERT_EQUALS(G.getR(), M);
-    TS_ASSERT_THROWS(G.setRotationAngle("Axis4", 3), std::invalid_argument);
+    TS_ASSERT_THROWS(G.setRotationAngle("Axis4", 3), const std::invalid_argument &);
     TS_ASSERT_THROWS_ANYTHING(G.setRotationAngle(1, 2));
     TS_ASSERT_EQUALS((G.axesInfo()).compare("No axis is found\n"), 0);
     TS_ASSERT(!G.isDefined());
@@ -45,7 +45,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(G.pushAxis("Axis2", 0., 0., 1., 30));
     TS_ASSERT(G.isDefined());
     TS_ASSERT_THROWS(G.pushAxis("Axis2", 0., 0., 1., 30),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(G.setRotationAngle("Axis2", 25));
     TS_ASSERT_THROWS_NOTHING(G.setRotationAngle(0, -17));
     TS_ASSERT_EQUALS(G.getAxis(1).angle, 25.);
diff --git a/Framework/Geometry/test/GridDetectorTest.h b/Framework/Geometry/test/GridDetectorTest.h
index f8206ea3700b02c552f73edde14dee92773eb925..5ee9df1f2267ffb3b357efff4a323250ff43ee67 100644
--- a/Framework/Geometry/test/GridDetectorTest.h
+++ b/Framework/Geometry/test/GridDetectorTest.h
@@ -27,7 +27,7 @@ public:
   void testNameValueConstructor() {
     GridDetector q("Name");
     TS_ASSERT_EQUALS(q.nelements(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "Name");
     TS_ASSERT(!q.getParent());
@@ -47,7 +47,7 @@ public:
 
     TS_ASSERT_EQUALS(q->getName(), "Child");
     TS_ASSERT_EQUALS(q->nelements(), 0);
-    TS_ASSERT_THROWS((*q)[0], std::runtime_error);
+    TS_ASSERT_THROWS((*q)[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(q->getParent());
     TS_ASSERT_EQUALS(q->getParent()->getName(), parent->getName());
@@ -85,7 +85,7 @@ public:
     TS_ASSERT_THROWS(det->initialize(cuboidShape, 100, -50.0, 1.0, 200, -100.0,
                                      1.0, 300, -20, 1.0, 1000000, "abc", 1000,
                                      1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testFullConstructor() {
@@ -210,10 +210,10 @@ private:
 
   void do_test_bounds(GridDetector *det) {
     // Go out of bounds
-    TS_ASSERT_THROWS(det->getAtXYZ(-1, 0, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXYZ(0, -1, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXYZ(100, 0, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXYZ(0, 205, 0), std::runtime_error);
+    TS_ASSERT_THROWS(det->getAtXYZ(-1, 0, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXYZ(0, -1, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXYZ(100, 0, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXYZ(0, 205, 0), const std::runtime_error &);
   }
 
   void do_test_ids(GridDetector *det) {
diff --git a/Framework/Geometry/test/GroupTest.h b/Framework/Geometry/test/GroupTest.h
index 2b881fa6cc880330710c0eb7d1c7b4ddc02c8825..043cbd31b30be8d4cf9ecd1b53d724dcbe44fde0 100644
--- a/Framework/Geometry/test/GroupTest.h
+++ b/Framework/Geometry/test/GroupTest.h
@@ -52,7 +52,7 @@ public:
     TS_ASSERT_EQUALS(groupOps.size(), 2);
 
     std::vector<SymmetryOperation> empty;
-    TS_ASSERT_THROWS(Group group(empty), std::invalid_argument);
+    TS_ASSERT_THROWS(Group group(empty), const std::invalid_argument &);
   }
 
   void testCopyConstructor() {
@@ -373,17 +373,17 @@ public:
     // Make sure that null-pointer do not work
     Group_const_sptr null;
 
-    TS_ASSERT_THROWS(null * null, std::invalid_argument);
+    TS_ASSERT_THROWS(null * null, const std::invalid_argument &);
     // clang gives a warning if we don't use the result
     GNU_DIAG_OFF("unused-comparison")
-    TS_ASSERT_THROWS(null == null, std::invalid_argument);
-    TS_ASSERT_THROWS(null != null, std::invalid_argument);
+    TS_ASSERT_THROWS(null == null, const std::invalid_argument &);
+    TS_ASSERT_THROWS(null != null, const std::invalid_argument &);
     GNU_DIAG_ON("unused-comparison")
-    TS_ASSERT_THROWS(three * null, std::invalid_argument);
-    TS_ASSERT_THROWS(null * three, std::invalid_argument);
+    TS_ASSERT_THROWS(three * null, const std::invalid_argument &);
+    TS_ASSERT_THROWS(null * three, const std::invalid_argument &);
 
     Mantid::Kernel::V3D coords(0.4, 0.3, 0.1);
-    TS_ASSERT_THROWS(null * coords, std::invalid_argument);
+    TS_ASSERT_THROWS(null * coords, const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Geometry/test/HKLFilterTest.h b/Framework/Geometry/test/HKLFilterTest.h
index 2b776070d4fed5ad80b6f7aaf11e7058f959ecf8..1e2e72084795dfb0fbd750ce5ed051b9b4b0f6df 100644
--- a/Framework/Geometry/test/HKLFilterTest.h
+++ b/Framework/Geometry/test/HKLFilterTest.h
@@ -56,7 +56,7 @@ public:
 
     HKLFilter_const_sptr invalid;
     TS_ASSERT_THROWS(MockHKLFilterUnaryLogicOperation op(invalid),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testBinaryLogicOperation() {
@@ -71,11 +71,11 @@ public:
 
     HKLFilter_const_sptr invalid;
     TS_ASSERT_THROWS(MockHKLFilterBinaryLogicOperation op(invalid, rhs),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(MockHKLFilterBinaryLogicOperation op(lhs, invalid),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(MockHKLFilterBinaryLogicOperation op(invalid, invalid),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testHKLFilterNot() {
diff --git a/Framework/Geometry/test/HKLFilterWavelengthTest.h b/Framework/Geometry/test/HKLFilterWavelengthTest.h
index 87875fa21e506467864fbe3fe45df2413f98252d..53a112fb7b44a25ddb648d57776dce4793258e2f 100644
--- a/Framework/Geometry/test/HKLFilterWavelengthTest.h
+++ b/Framework/Geometry/test/HKLFilterWavelengthTest.h
@@ -32,17 +32,17 @@ public:
         HKLFilterWavelength wavelengthFilter(ub, 0.9, 6.0));
 
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, -0.9, 6.0),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, 0.9, -6.0),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, -0.9, -6.0),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, 0.0, 6.0),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, 0.9, 0.0),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(HKLFilterWavelength wavelengthFilter(ub, 0.0, 0.0),
-                     std::range_error);
+                     const std::range_error &);
   }
 
   void testDescription() {
diff --git a/Framework/Geometry/test/IMDDimensionFactoryTest.h b/Framework/Geometry/test/IMDDimensionFactoryTest.h
index 9fb1733f768161d3478f5965a45040f4f3c11239..6e4a4f7ebcbb0f1725ad99cb9deb8879b3f3ff53 100644
--- a/Framework/Geometry/test/IMDDimensionFactoryTest.h
+++ b/Framework/Geometry/test/IMDDimensionFactoryTest.h
@@ -110,39 +110,39 @@ public:
   }
 
   void testPassInvalidString() {
-    TS_ASSERT_THROWS(createDimension(""), std::invalid_argument);
-    TS_ASSERT_THROWS(createDimension("garbage"), std::invalid_argument);
+    TS_ASSERT_THROWS(createDimension(""), const std::invalid_argument &);
+    TS_ASSERT_THROWS(createDimension("garbage"), const std::invalid_argument &);
 
     std::string missingID =
         constructNonReciprocalDimensionXMLString().erase(10, 8);
-    TS_ASSERT_THROWS(createDimension(missingID), std::invalid_argument);
+    TS_ASSERT_THROWS(createDimension(missingID), const std::invalid_argument &);
     std::string missingName =
         constructNonReciprocalDimensionXMLString().erase(19, 19);
-    TS_ASSERT_THROWS(createDimension(missingName), std::invalid_argument);
+    TS_ASSERT_THROWS(createDimension(missingName), const std::invalid_argument &);
     std::string missingUpperBounds =
         constructNonReciprocalDimensionXMLString().erase(38, 30);
     TS_ASSERT_THROWS(createDimension(missingUpperBounds),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::string missingUpperBoundsValue =
         constructNonReciprocalDimensionXMLString().erase(51, 3);
     TS_ASSERT_THROWS(createDimension(missingUpperBoundsValue),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::string missingLowerBounds =
         constructNonReciprocalDimensionXMLString().erase(68, 28);
     TS_ASSERT_THROWS(createDimension(missingLowerBounds),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::string missingLowerBoundsValue =
         constructNonReciprocalDimensionXMLString().erase(81, 1);
     TS_ASSERT_THROWS(createDimension(missingLowerBoundsValue),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::string missingNumberOfBins =
         constructNonReciprocalDimensionXMLString().erase(96, 30);
     TS_ASSERT_THROWS(createDimension(missingNumberOfBins),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::string missingNumberOfBinsValue =
         constructNonReciprocalDimensionXMLString().erase(110, 1);
     TS_ASSERT_THROWS(createDimension(missingNumberOfBins),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testExtractFrame() {
diff --git a/Framework/Geometry/test/InstrumentDefinitionParserTest.h b/Framework/Geometry/test/InstrumentDefinitionParserTest.h
index 34843cdf3f2b067d0c6a669a1bd99cabdc28115c..e23c1c399df9d2b3557d8a903a301224c114ff8d 100644
--- a/Framework/Geometry/test/InstrumentDefinitionParserTest.h
+++ b/Framework/Geometry/test/InstrumentDefinitionParserTest.h
@@ -995,12 +995,12 @@ public:
     detid_t numDetectors = 2;
 
     TS_ASSERT_THROWS(loadInstrLocations(locations, numDetectors, true),
-                     Exception::InstrumentDefinitionError);
+                     const Exception::InstrumentDefinitionError &);
 
     locations = R"(<locations n-elements="-1" t="0.0" t-end="180.0" />)";
 
     TS_ASSERT_THROWS(loadInstrLocations(locations, numDetectors, true),
-                     Exception::InstrumentDefinitionError);
+                     const Exception::InstrumentDefinitionError &);
   }
 
   void testLocationsNotANumber() {
@@ -1030,7 +1030,7 @@ public:
     detid_t numDetectors = 2;
 
     TS_ASSERT_THROWS(loadInstrLocations(locations, numDetectors, true),
-                     Exception::InstrumentDefinitionError);
+                     const Exception::InstrumentDefinitionError &);
   }
 };
 
diff --git a/Framework/Geometry/test/InstrumentRayTracerTest.h b/Framework/Geometry/test/InstrumentRayTracerTest.h
index ec8f86ddaa7c047ac0f5048b4e9221cc9312a02a..dd66f76c2d0010de9ff159ad435e7f37f7fbeb26 100644
--- a/Framework/Geometry/test/InstrumentRayTracerTest.h
+++ b/Framework/Geometry/test/InstrumentRayTracerTest.h
@@ -48,13 +48,13 @@ public:
   void
   test_That_Constructor_Throws_Invalid_Argument_On_Giving_A_Null_Instrument() {
     TS_ASSERT_THROWS(new InstrumentRayTracer(boost::shared_ptr<Instrument>()),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
   test_That_Constructor_Throws_Invalid_Argument_On_Giving_An_Instrument_With_No_Source() {
     Instrument_sptr testInst(new Instrument("empty"));
-    TS_ASSERT_THROWS(new InstrumentRayTracer(testInst), std::invalid_argument);
+    TS_ASSERT_THROWS(new InstrumentRayTracer(testInst), const std::invalid_argument &);
   }
 
   void
diff --git a/Framework/Geometry/test/InstrumentTest.h b/Framework/Geometry/test/InstrumentTest.h
index 7fb5caff696e80119c629f687ac17a1dcc8eb71e..a5d589fbf2e8ef18a44dd42a0c6f48a097bc6973 100644
--- a/Framework/Geometry/test/InstrumentTest.h
+++ b/Framework/Geometry/test/InstrumentTest.h
@@ -67,8 +67,8 @@ public:
     TS_ASSERT(!i.getSource());
     TS_ASSERT(!i.getSample());
     TS_ASSERT(!i.isParametrized());
-    TS_ASSERT_THROWS(i.baseInstrument(), std::runtime_error);
-    TS_ASSERT_THROWS(i.getParameterMap(), std::runtime_error);
+    TS_ASSERT_THROWS(i.baseInstrument(), const std::runtime_error &);
+    TS_ASSERT_THROWS(i.getParameterMap(), const std::runtime_error &);
 
     Instrument ii("anInstrument");
     TS_ASSERT(!ii.getSource());
@@ -86,8 +86,8 @@ public:
     TS_ASSERT_EQUALS(i.getDefaultView(), instrument.getDefaultView());
     TS_ASSERT_EQUALS(i.getDefaultAxis(), instrument.getDefaultAxis());
     // Should not be parameterized - there's a different constructor for that
-    TS_ASSERT_THROWS(i.baseInstrument(), std::runtime_error);
-    TS_ASSERT_THROWS(i.getParameterMap(), std::runtime_error);
+    TS_ASSERT_THROWS(i.baseInstrument(), const std::runtime_error &);
+    TS_ASSERT_THROWS(i.getParameterMap(), const std::runtime_error &);
     TS_ASSERT_EQUALS(i.getValidFromDate(), instrument.getValidFromDate());
     TS_ASSERT_EQUALS(i.getValidToDate(), instrument.getValidToDate());
 
@@ -137,7 +137,7 @@ public:
     TS_ASSERT(!i.getSource());
     ObjComponent *s = new ObjComponent("");
     // Cannot have an unnamed source
-    TS_ASSERT_THROWS(i.markAsSource(s), Exception::InstrumentDefinitionError);
+    TS_ASSERT_THROWS(i.markAsSource(s), const Exception::InstrumentDefinitionError &);
     s->setName("source");
     TS_ASSERT_THROWS_NOTHING(i.markAsSource(s));
     TS_ASSERT_EQUALS(i.getSource().get(), s);
@@ -152,8 +152,9 @@ public:
   void test_Marking_Chopper_Point_Without_Defined_Source_Throws_Exception() {
     Instrument instr;
     const ObjComponent *chopper = new ObjComponent("chopper1");
-    TS_ASSERT_THROWS(instr.markAsChopperPoint(chopper),
-                     Mantid::Kernel::Exception::InstrumentDefinitionError);
+    TS_ASSERT_THROWS(
+        instr.markAsChopperPoint(chopper),
+        const Mantid::Kernel::Exception::InstrumentDefinitionError &);
     delete chopper;
   }
 
@@ -167,13 +168,14 @@ public:
   void test_Marking_Unamed_Chopper_As_Chopper_Throws_Exception() {
     Instrument_sptr instr = createInstrumentWithSource();
     const ObjComponent *chopper = new ObjComponent("");
-    TS_ASSERT_THROWS(instr->markAsChopperPoint(chopper), std::invalid_argument);
+    TS_ASSERT_THROWS(instr->markAsChopperPoint(chopper),
+                     const std::invalid_argument &);
     delete chopper; // It was not added to the assembly
   }
 
   void test_Retrieving_Chopper_With_Invalid_Index_Throws_Exception() {
     Instrument_sptr instr = createInstrumentWithSource();
-    TS_ASSERT_THROWS(instr->getChopperPoint(0), std::invalid_argument);
+    TS_ASSERT_THROWS(instr->getChopperPoint(0), const std::invalid_argument &);
   }
 
   void test_Inserting_Chopper_Closest_To_Source_Gets_Set_To_Index_Zero() {
@@ -224,7 +226,7 @@ public:
     ObjComponent *s = new ObjComponent("");
     // Cannot have an unnamed source
     TS_ASSERT_THROWS(i.markAsSamplePos(s),
-                     Exception::InstrumentDefinitionError);
+                     const Exception::InstrumentDefinitionError &);
     s->setName("sample");
     TS_ASSERT_THROWS_NOTHING(i.markAsSamplePos(s));
     TS_ASSERT_EQUALS(i.getSample().get(), s);
@@ -250,9 +252,11 @@ public:
   }
 
   void testDetector() {
-    TS_ASSERT_THROWS(instrument.getDetector(0), Exception::NotFoundError);
+    TS_ASSERT_THROWS(instrument.getDetector(0),
+                     const Exception::NotFoundError &);
     TS_ASSERT_EQUALS(instrument.getDetector(1).get(), det);
-    TS_ASSERT_THROWS(instrument.getDetector(2), Exception::NotFoundError);
+    TS_ASSERT_THROWS(instrument.getDetector(2),
+                     const Exception::NotFoundError &);
     Detector *d = new Detector("det", 2, nullptr);
     TS_ASSERT_THROWS_NOTHING(instrument.markAsDetector(d));
     TS_ASSERT_EQUALS(instrument.getDetector(2).get(), d);
@@ -267,15 +271,15 @@ public:
     // Next 2 lines demonstrate what can happen if detector cache and
     // CompAssembly tree are inconsistent
     // Unfortunately, the way things were written means that this can happen
-    TS_ASSERT_THROWS(i.removeDetector(d), std::runtime_error);
-    TS_ASSERT_THROWS(i.getDetector(1).get(), Exception::NotFoundError);
+    TS_ASSERT_THROWS(i.removeDetector(d), const std::runtime_error &);
+    TS_ASSERT_THROWS(i.getDetector(1).get(), const Exception::NotFoundError &);
     // Now make the 2 calls necessary to do it properly
     TS_ASSERT_THROWS_NOTHING(i.add(d));
     TS_ASSERT_THROWS_NOTHING(i.markAsDetector(d));
     TS_ASSERT_EQUALS(i.getDetectorIDs(false).size(), 1);
     TS_ASSERT_EQUALS(i.nelements(), 1);
     TS_ASSERT_THROWS_NOTHING(i.removeDetector(d));
-    TS_ASSERT_THROWS(i.getDetector(1).get(), Exception::NotFoundError);
+    TS_ASSERT_THROWS(i.getDetector(1).get(), const Exception::NotFoundError &);
     TS_ASSERT_EQUALS(i.nelements(), 0);
 
     // Now check it does the right thing for a monitor as well
@@ -326,7 +330,7 @@ public:
 
     std::vector<IDetector_const_sptr> dets;
     TS_ASSERT_THROWS(dets = instrument.getDetectors(detIDs),
-                     Kernel::Exception::NotFoundError);
+                     const Kernel::Exception::NotFoundError &);
   }
 
   void testCasts() {
@@ -406,7 +410,7 @@ public:
         ComponentCreationHelper::createTestInstrumentRectangular(5, 6);
     std::vector<IDetector_const_sptr> dets;
     TS_ASSERT_THROWS(inst->getDetectorsInBank(dets, "bank_in_the_dark_side"),
-                     Exception::NotFoundError)
+                     const Exception::NotFoundError &)
   }
 
   void test_getDetectors() {
@@ -653,7 +657,8 @@ public:
     // GridDetectorPixel (parameters ignored by
     // GridDetectorPixel::getRelativePos), so we cannot support this.
     detInfo.setPosition(3, detInfo.position(3) + detOffset);
-    TS_ASSERT_THROWS(instr->makeLegacyParameterMap(), std::runtime_error);
+    TS_ASSERT_THROWS(instr->makeLegacyParameterMap(),
+                     const std::runtime_error &);
 
     // 2 bank parameters + 0 det parameters
     TS_ASSERT_EQUALS(legacyMap->size(), 2);
diff --git a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h
index 0d72a4864f2b1cbcdb142b164edc3635eda0b9e3..078d8a3d1a16fcab2f9938ec701b3e2a64f87830 100644
--- a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h
+++ b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h
@@ -61,9 +61,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(scatterer->setProperty("Occupancy", 1.0));
 
     TS_ASSERT_THROWS(scatterer->setProperty("Occupancy", -0.3),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(scatterer->setProperty("Occupancy", 1.3),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetSetU() {
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(scatterer->setProperty("U", 1.23e12));
     TS_ASSERT_THROWS_NOTHING(scatterer->setProperty("U", 1.23e-2));
 
-    TS_ASSERT_THROWS(scatterer->setProperty("U", -0.2), std::invalid_argument);
+    TS_ASSERT_THROWS(scatterer->setProperty("U", -0.2), const std::invalid_argument &);
   }
 
   void testCreate() {
diff --git a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
index 0a47f50a08a08e8ba80d7192cb1e6f8fa67878fc..992a8e589a257ea4b724f87ab3cc3c3641e49d76 100644
--- a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
+++ b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h
@@ -187,16 +187,16 @@ public:
     MDGeometryBuilderXML<StrictDimensionPolicy> builder;
     TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the "
                       "x mapping, which is integrated.",
-                      builder.addXDimension(dimension), std::invalid_argument);
+                      builder.addXDimension(dimension), const std::invalid_argument &);
     TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the "
                       "y mapping, which is integrated.",
-                      builder.addYDimension(dimension), std::invalid_argument);
+                      builder.addYDimension(dimension), const std::invalid_argument &);
     TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the "
                       "z mapping, which is integrated.",
-                      builder.addZDimension(dimension), std::invalid_argument);
+                      builder.addZDimension(dimension), const std::invalid_argument &);
     TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the "
                       "t mapping, which is integrated.",
-                      builder.addTDimension(dimension), std::invalid_argument);
+                      builder.addTDimension(dimension), const std::invalid_argument &);
   }
 
   // Same as test above, but shouldn't throw.
diff --git a/Framework/Geometry/test/MDGeometryXMLParserTest.h b/Framework/Geometry/test/MDGeometryXMLParserTest.h
index 2ddbeb0b48a91372e48ad1712a95c3a549a8a15c..7e5db3d9efcb68906c17009d2ed3fb03db75ca0f 100644
--- a/Framework/Geometry/test/MDGeometryXMLParserTest.h
+++ b/Framework/Geometry/test/MDGeometryXMLParserTest.h
@@ -183,7 +183,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getNonMappedDimensions(), std::runtime_error);
+        xmlParser.getNonMappedDimensions(), const std::runtime_error &);
   }
 
   void testGetXDimensionThrows() {
@@ -191,7 +191,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getXDimension(), std::runtime_error);
+        xmlParser.getXDimension(), const std::runtime_error &);
   }
 
   void testGetYDimensionThrows() {
@@ -199,7 +199,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getYDimension(), std::runtime_error);
+        xmlParser.getYDimension(), const std::runtime_error &);
   }
 
   void testGetZDimensionThrows() {
@@ -207,7 +207,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getZDimension(), std::runtime_error);
+        xmlParser.getZDimension(), const std::runtime_error &);
   }
 
   void testGetTDimensionThrows() {
@@ -215,7 +215,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getTDimension(), std::runtime_error);
+        xmlParser.getTDimension(), const std::runtime_error &);
   }
 
   void testGetAllDimensionsThrows() {
@@ -223,7 +223,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getAllDimensions(), std::runtime_error);
+        xmlParser.getAllDimensions(), const std::runtime_error &);
   }
 
   void testGetNonIntegratedDimensionsThrows() {
@@ -231,7 +231,7 @@ public:
     MDGeometryXMLParser xmlParser(constructXML("qy", "qx", "en", "qz"));
     TSM_ASSERT_THROWS(
         "execute not called before using getter. Should have thrown",
-        xmlParser.getNonIntegratedDimensions(), std::runtime_error);
+        xmlParser.getNonIntegratedDimensions(), const std::runtime_error &);
   }
 
   void testGetAllDimensions() {
@@ -358,7 +358,7 @@ public:
                                                                    // schema.
     xmlParser.SetRootNodeCheck(
         "SomeOtherSchemaElement"); // This won't match so should throw!
-    TS_ASSERT_THROWS(xmlParser.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(xmlParser.execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Geometry/test/MDHistoDimensionBuilderTest.h b/Framework/Geometry/test/MDHistoDimensionBuilderTest.h
index 0b1a9a8b77b1779b046d857b6f4e65d9c2608b86..d9b237a06d4e7322fc140ffbead05db7ecfb25b5 100644
--- a/Framework/Geometry/test/MDHistoDimensionBuilderTest.h
+++ b/Framework/Geometry/test/MDHistoDimensionBuilderTest.h
@@ -173,7 +173,7 @@ public:
     builder.setMax(2);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testNoIdThrows() {
@@ -185,7 +185,7 @@ public:
     builder.setMax(2);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testNoUnitThrows() {
@@ -197,7 +197,7 @@ public:
     builder.setMax(2);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testNoMaxThrows() {
@@ -209,7 +209,7 @@ public:
     // builder.setMax(2);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testNoMinThrows() {
@@ -221,7 +221,7 @@ public:
     builder.setMax(2);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testMinLessThanMaxThrows() {
@@ -233,7 +233,7 @@ public:
     builder.setMax(0);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testMinEqualToMaxThrows() {
@@ -245,7 +245,7 @@ public:
     builder.setMax(1);
     builder.setNumBins(1);
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 
   void testNBinsLessThanOneThrows() {
@@ -257,7 +257,7 @@ public:
     builder.setMax(2);
     builder.setNumBins(0); // No bins!
 
-    TS_ASSERT_THROWS(builder.create(), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.create(), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Geometry/test/MDHistoDimensionTest.h b/Framework/Geometry/test/MDHistoDimensionTest.h
index e1bfcc8d1187c746714d735cac652d46d75bc696..a587ab7aac510ba6b2f99449d26336c96159d0f8 100644
--- a/Framework/Geometry/test/MDHistoDimensionTest.h
+++ b/Framework/Geometry/test/MDHistoDimensionTest.h
@@ -25,7 +25,7 @@ public:
     Mantid::Geometry::GeneralFrame frame("My General Frame", "Furlongs");
     TSM_ASSERT_THROWS("Should throw if min > max!",
                       MDHistoDimension("name", "id", frame, min, max, 15),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void test_constructor() {
diff --git a/Framework/Geometry/test/MatrixVectorPairParserTest.h b/Framework/Geometry/test/MatrixVectorPairParserTest.h
index ceeb8fc4e1138005fe06e65328c450b7ba714904..8dccfdc1ee6b943bf7fcc1d07bd8881b6c494d08 100644
--- a/Framework/Geometry/test/MatrixVectorPairParserTest.h
+++ b/Framework/Geometry/test/MatrixVectorPairParserTest.h
@@ -27,28 +27,28 @@ public:
     std::string tooLong("1/2x,-4y,-2-z,x");
 
     TS_ASSERT_THROWS(parseMatrixVectorPair<double>(tooLong),
-                     Exception::ParseError);
+                     const Exception::ParseError &);
   }
 
   void test_throws_on_short_input() {
     std::string tooShort("2/3x,-x+y");
 
     TS_ASSERT_THROWS(parseMatrixVectorPair<double>(tooShort),
-                     Exception::ParseError);
+                     const Exception::ParseError &);
   }
 
   void test_throws_on_empty_element() {
     std::string emptyY("2/3x, ,-x+y");
 
     TS_ASSERT_THROWS(parseMatrixVectorPair<double>(emptyY),
-                     Exception::ParseError);
+                     const Exception::ParseError &);
   }
 
   void test_throws_on_zero_division() {
     std::string zeroDivision("2/0x,-4y,-2-z,x");
 
     TS_ASSERT_THROWS(parseMatrixVectorPair<double>(zeroDivision),
-                     Exception::ParseError);
+                     const Exception::ParseError &);
   }
 
   void test_parse_many_directions() {
diff --git a/Framework/Geometry/test/MeshObjectTest.h b/Framework/Geometry/test/MeshObjectTest.h
index 4ef4f11464b4ebbcede293e6c046740011e5d009..430a0e31e2d38363b117d0b5c8d8ad966211a0bd 100644
--- a/Framework/Geometry/test/MeshObjectTest.h
+++ b/Framework/Geometry/test/MeshObjectTest.h
@@ -854,7 +854,7 @@ public:
     auto geom_obj = createOctahedron();
     size_t maxAttempts(1);
     TS_ASSERT_THROWS(geom_obj->generatePointInObject(rng, maxAttempts),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testVolumeOfCube() {
diff --git a/Framework/Geometry/test/ObjCompAssemblyTest.h b/Framework/Geometry/test/ObjCompAssemblyTest.h
index bc31cf9789b8e865698a92e0c2c43e4cb0c1016e..6697468645d93951ae80fd3405d6890844921331 100644
--- a/Framework/Geometry/test/ObjCompAssemblyTest.h
+++ b/Framework/Geometry/test/ObjCompAssemblyTest.h
@@ -26,7 +26,7 @@ public:
   void testNameValueConstructor() {
     ObjCompAssembly q("Name");
     TS_ASSERT_EQUALS(q.nelements(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "Name");
     TS_ASSERT(!q.getParent());
@@ -42,7 +42,7 @@ public:
     ObjCompAssembly *q = new ObjCompAssembly("Child", parent);
     TS_ASSERT_EQUALS(q->getName(), "Child");
     TS_ASSERT_EQUALS(q->nelements(), 0);
-    TS_ASSERT_THROWS((*q)[0], std::runtime_error);
+    TS_ASSERT_THROWS((*q)[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(q->getParent());
     TS_ASSERT_EQUALS(q->getParent()->getName(), parent->getName());
@@ -57,8 +57,9 @@ public:
   void testAddBad() {
     ObjCompAssembly bank("BankName");
     Component det1("Det1Name");
-    TS_ASSERT_THROWS(bank.add(&det1),
-                     Mantid::Kernel::Exception::InstrumentDefinitionError);
+    TS_ASSERT_THROWS(
+        bank.add(&det1),
+        const Mantid::Kernel::Exception::InstrumentDefinitionError &);
   }
 
   void testAdd() {
@@ -67,7 +68,7 @@ public:
     Component *det2 = new ObjComponent("Det2Name");
     Component *det3 = new ObjComponent("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.add(det1);
     bank.add(det2);
     bank.add(det3);
@@ -86,7 +87,7 @@ public:
     ObjComponent det2("Det2Name");
     ObjComponent det3("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.addCopy(&det1);
     bank.addCopy(&det2);
     bank.addCopy(&det3, "ChangedDet3Name");
@@ -396,7 +397,7 @@ public:
     bank.add(det3);
 
     TS_ASSERT_THROWS(boost::shared_ptr<IObject> shape = bank.createOutline(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Geometry/test/ObjComponentTest.h b/Framework/Geometry/test/ObjComponentTest.h
index 32bf56a2daef978472c9bff2237cba121eec0922..05ee1035db521bba091bde15030596d2fd675e43 100644
--- a/Framework/Geometry/test/ObjComponentTest.h
+++ b/Framework/Geometry/test/ObjComponentTest.h
@@ -181,7 +181,7 @@ public:
     // throw
     ObjComponent comp("noShape");
     TS_ASSERT_THROWS(comp.interceptSurface(track),
-                     Exception::NullPointerException);
+                     const Exception::NullPointerException &);
   }
 
   void testSolidAngleCappedCylinder() {
@@ -211,7 +211,7 @@ public:
     // throw
     ObjComponent B("noShape");
     TS_ASSERT_THROWS(B.solidAngle(V3D(1, 2, 3)),
-                     Exception::NullPointerException);
+                     const Exception::NullPointerException &);
   }
 
   void testBoundingBoxCappedCylinder() {
@@ -445,7 +445,7 @@ public:
     // throw
     ObjComponent B("noShape");
     TS_ASSERT_THROWS(B.solidAngle(V3D(1, 2, 3)),
-                     Exception::NullPointerException)
+                     const Exception::NullPointerException &)
     delete A;
   }
 
diff --git a/Framework/Geometry/test/OrientedLatticeTest.h b/Framework/Geometry/test/OrientedLatticeTest.h
index bcc1019b7d275ee65db15f330c9fa6a002989db4..87dcc11761c825d664fce1968003f510e1f67642 100644
--- a/Framework/Geometry/test/OrientedLatticeTest.h
+++ b/Framework/Geometry/test/OrientedLatticeTest.h
@@ -93,7 +93,7 @@ public:
     TSM_ASSERT_THROWS("The transformation to plane defined by two parallel "
                       "vectors should throw",
                       theCell.setUFromVectors(V3D(0, 1, 0), V3D(0, 1, 0)),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   /** @author Alex Buts, fixed by Andrei Savici */
diff --git a/Framework/Geometry/test/ParCompAssemblyTest.h b/Framework/Geometry/test/ParCompAssemblyTest.h
index 3058d5eee4bbc0f15887453ae188360f70815bae..7306799fe11e116b3e440fc787aec9a1da8ca22d 100644
--- a/Framework/Geometry/test/ParCompAssemblyTest.h
+++ b/Framework/Geometry/test/ParCompAssemblyTest.h
@@ -27,7 +27,7 @@ public:
     CompAssembly pq(&q, pmap.get());
 
     TS_ASSERT_EQUALS(pq.nelements(), 0);
-    TS_ASSERT_THROWS(pq[0], std::runtime_error);
+    TS_ASSERT_THROWS(pq[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(pq.getName(), "");
     TS_ASSERT(!pq.getParent());
@@ -44,7 +44,7 @@ public:
     CompAssembly pq(&q, pmap.get());
 
     TS_ASSERT_EQUALS(pq.nelements(), 0);
-    TS_ASSERT_THROWS(pq[0], std::runtime_error);
+    TS_ASSERT_THROWS(pq[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(pq.getName(), "Name");
     TS_ASSERT(!pq.getParent());
@@ -64,7 +64,7 @@ public:
 
     TS_ASSERT_EQUALS(pq.getName(), "Child");
     TS_ASSERT_EQUALS(pq.nelements(), 0);
-    TS_ASSERT_THROWS(pq[0], std::runtime_error);
+    TS_ASSERT_THROWS(pq[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(pq.getParent());
     TS_ASSERT_EQUALS(pq.getParent()->getName(), parent->getName());
@@ -82,7 +82,7 @@ public:
     Component *det2 = new Component("Det2Name");
     Component *det3 = new Component("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.add(det1);
     bank.add(det2);
     bank.add(det3);
diff --git a/Framework/Geometry/test/ParDetectorTest.h b/Framework/Geometry/test/ParDetectorTest.h
index 3f399409dabe574157a70d33b8a8eda0bb084c65..cd16a899d8754f1ab845eb9d844471c5149e9cc1 100644
--- a/Framework/Geometry/test/ParDetectorTest.h
+++ b/Framework/Geometry/test/ParDetectorTest.h
@@ -65,8 +65,8 @@ public:
 
     // Reading and writing masking should throw: Masking is now stored in
     // DetectorInfo and ParameterMap should reject it.
-    TS_ASSERT_THROWS(pmap->get(&det, "masked"), std::runtime_error);
-    TS_ASSERT_THROWS(pmap->addBool(&det, "masked", true), std::runtime_error);
+    TS_ASSERT_THROWS(pmap->get(&det, "masked"), const std::runtime_error &);
+    TS_ASSERT_THROWS(pmap->addBool(&det, "masked", true), const std::runtime_error &);
   }
 
   void testGetNumberParameter() {
diff --git a/Framework/Geometry/test/ParInstrumentTest.h b/Framework/Geometry/test/ParInstrumentTest.h
index 1f59db0d82dd2d0f7be1cd83a9f83befe49392c8..22e7ee0b3cd62cd7f837f9d14ef406a7ed0385a6 100644
--- a/Framework/Geometry/test/ParInstrumentTest.h
+++ b/Framework/Geometry/test/ParInstrumentTest.h
@@ -51,13 +51,14 @@ public:
   void test_Constructor_Throws_With_Invalid_Pointers() {
     TS_ASSERT_THROWS(Instrument(boost::shared_ptr<Instrument>(),
                                 boost::shared_ptr<ParameterMap>()),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // boost::shared_ptr<Instrument> instr = boost::make_shared<Instrument>();
-    // TS_ASSERT_THROWS(Instrument(instr,boost::shared_ptr<ParameterMap>()),std::invalid_argument);
+    // TS_ASSERT_THROWS(Instrument(instr,boost::shared_ptr<ParameterMap>()),const
+    // std::invalid_argument &);
     boost::shared_ptr<ParameterMap> paramMap =
         boost::make_shared<ParameterMap>();
     TS_ASSERT_THROWS(Instrument(boost::shared_ptr<Instrument>(), paramMap),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_getMonitors() {
@@ -70,9 +71,11 @@ public:
 
   void testDetector() {
     Instrument pinstrument(instrument, pmap);
-    TS_ASSERT_THROWS(pinstrument.getDetector(0), Exception::NotFoundError);
+    TS_ASSERT_THROWS(pinstrument.getDetector(0),
+                     const Exception::NotFoundError &);
     TS_ASSERT_EQUALS(pinstrument.getDetector(1)->getID(), det->getID());
-    TS_ASSERT_THROWS(pinstrument.getDetector(2), Exception::NotFoundError);
+    TS_ASSERT_THROWS(pinstrument.getDetector(2),
+                     const Exception::NotFoundError &);
 
     TS_ASSERT(nullptr == pinstrument.getBaseDetector(0));
     Detector *d = new Detector("det", 2, nullptr);
diff --git a/Framework/Geometry/test/ParObjCompAssemblyTest.h b/Framework/Geometry/test/ParObjCompAssemblyTest.h
index 8fa6cbf6fd896557c3a655e822deb98f70d4747b..8bd7fbda51646916df187506750bd77b8e7b3d2e 100644
--- a/Framework/Geometry/test/ParObjCompAssemblyTest.h
+++ b/Framework/Geometry/test/ParObjCompAssemblyTest.h
@@ -29,7 +29,7 @@ public:
     ObjCompAssembly pq(&q, pmap.get());
 
     TS_ASSERT_EQUALS(pq.nelements(), 0);
-    TS_ASSERT_THROWS(pq[0], std::runtime_error);
+    TS_ASSERT_THROWS(pq[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(pq.getName(), "Name");
     TS_ASSERT(!pq.getParent());
@@ -49,7 +49,7 @@ public:
 
     TS_ASSERT_EQUALS(pq.getName(), "Child");
     TS_ASSERT_EQUALS(pq.nelements(), 0);
-    TS_ASSERT_THROWS(pq[0], std::runtime_error);
+    TS_ASSERT_THROWS(pq[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(pq.getParent());
     TS_ASSERT_EQUALS(pq.getParent()->getName(), parent->getName());
@@ -67,7 +67,7 @@ public:
     Component *det2 = new ObjComponent("Det2Name");
     Component *det3 = new ObjComponent("Det3Name");
     TS_ASSERT_EQUALS(bank.nelements(), 0);
-    TS_ASSERT_THROWS(bank[0], std::runtime_error);
+    TS_ASSERT_THROWS(bank[0], const std::runtime_error &);
     bank.add(det1);
     bank.add(det2);
     bank.add(det3);
diff --git a/Framework/Geometry/test/ParObjComponentTest.h b/Framework/Geometry/test/ParObjComponentTest.h
index c0d7f5d9be64dcb6258b1de65235740ad6b91fed..27ca851e2aae91a1085b73a2300a51181a313de4 100644
--- a/Framework/Geometry/test/ParObjComponentTest.h
+++ b/Framework/Geometry/test/ParObjComponentTest.h
@@ -196,7 +196,7 @@ public:
     ObjComponent pcomp(&comp, pmap.get());
 
     TS_ASSERT_THROWS(pcomp.interceptSurface(track),
-                     Exception::NullPointerException);
+                     const Exception::NullPointerException &);
   }
 
   void testSolidAngleCappedCylinder() {
@@ -232,7 +232,7 @@ public:
     ObjComponent pB(&B, pmap.get());
 
     TS_ASSERT_THROWS(pB.solidAngle(V3D(1, 2, 3)),
-                     Exception::NullPointerException);
+                     const Exception::NullPointerException &);
   }
 
   void testBoundingBoxCappedCylinder() {
diff --git a/Framework/Geometry/test/PointGroupFactoryTest.h b/Framework/Geometry/test/PointGroupFactoryTest.h
index 38562313eb64fb3d1796657dbbe6b0e5e71f33c4..b7a692df2fff2ff6311361860063977dcaad1c0c 100644
--- a/Framework/Geometry/test/PointGroupFactoryTest.h
+++ b/Framework/Geometry/test/PointGroupFactoryTest.h
@@ -58,7 +58,7 @@ public:
         PointGroupFactory::Instance().createPointGroup("triclinic"));
 
     TS_ASSERT_THROWS(PointGroupFactory::Instance().createPointGroup("cubicC"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetAllPointGroupSymbols() {
@@ -96,7 +96,7 @@ public:
 
     TS_ASSERT_THROWS(
         PointGroupFactory::Instance().createPointGroup("monoclinicA"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     PointGroupFactory::Instance().subscribePointGroup("monoclinicA", "x,y,-z",
                                                       "test");
diff --git a/Framework/Geometry/test/PointGroupTest.h b/Framework/Geometry/test/PointGroupTest.h
index 1887036560d8a5bccefa8cf157908cfe17ee5ff6..f8c4696cdccf4e9574246a6e3108a87473e3bf00 100644
--- a/Framework/Geometry/test/PointGroupTest.h
+++ b/Framework/Geometry/test/PointGroupTest.h
@@ -366,7 +366,7 @@ public:
                      PointGroup::CrystalSystem::Triclinic);
 
     TS_ASSERT_THROWS(getCrystalSystemFromString("DoesNotExist"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_EQUALS(getCrystalSystemFromString(getCrystalSystemAsString(
                          PointGroup::CrystalSystem::Cubic)),
@@ -415,7 +415,7 @@ public:
                      PointGroup::LatticeSystem::Triclinic);
 
     TS_ASSERT_THROWS(getLatticeSystemFromString("DoesNotExist"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_EQUALS(getLatticeSystemFromString(getLatticeSystemAsString(
                          PointGroup::LatticeSystem::Cubic)),
diff --git a/Framework/Geometry/test/RasterizeTest.h b/Framework/Geometry/test/RasterizeTest.h
index f47791d74ea0b83d5cfaf109b6d74a11dbb6b3e9..63de4d4880ef2c6e26399c00a7ad5b481d4fb3c4 100644
--- a/Framework/Geometry/test/RasterizeTest.h
+++ b/Framework/Geometry/test/RasterizeTest.h
@@ -187,7 +187,7 @@ public:
     const auto sphere = createSphere(true);
     TS_ASSERT_THROWS(
         Rasterize::calculateCylinder(V3D(0., 0., 1.), sphere, 3, 3),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_calculateArbitraryOnCylinder() {
diff --git a/Framework/Geometry/test/RectangularDetectorTest.h b/Framework/Geometry/test/RectangularDetectorTest.h
index 1a4a8ab31a81360aa4b5c62ca556594390f71032..09220e9ed9a39a0b572cfd1f680891213014ba72 100644
--- a/Framework/Geometry/test/RectangularDetectorTest.h
+++ b/Framework/Geometry/test/RectangularDetectorTest.h
@@ -27,7 +27,7 @@ public:
   void testNameValueConstructor() {
     RectangularDetector q("Name");
     TS_ASSERT_EQUALS(q.nelements(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "Name");
     TS_ASSERT(!q.getParent());
@@ -47,7 +47,7 @@ public:
 
     TS_ASSERT_EQUALS(q->getName(), "Child");
     TS_ASSERT_EQUALS(q->nelements(), 0);
-    TS_ASSERT_THROWS((*q)[0], std::runtime_error);
+    TS_ASSERT_THROWS((*q)[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(q->getParent());
     TS_ASSERT_EQUALS(q->getParent()->getName(), parent->getName());
@@ -114,10 +114,10 @@ public:
     TS_ASSERT_EQUALS(det->ysize(), 200.0);
 
     // Go out of bounds
-    TS_ASSERT_THROWS(det->getAtXY(-1, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(0, -1), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(100, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(0, 205), std::runtime_error);
+    TS_ASSERT_THROWS(det->getAtXY(-1, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(0, -1), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(100, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(0, 205), const std::runtime_error &);
 
     // Check some ids
     TS_ASSERT_EQUALS(det->getAtXY(0, 0)->getID() - 1000000, 0);
diff --git a/Framework/Geometry/test/ReferenceFrameTest.h b/Framework/Geometry/test/ReferenceFrameTest.h
index 3a6f2d69c8aa9ba3671d7befa98737cb3714b5f2..ddaa20e3c1622f96751c3423e402065201be6fb8 100644
--- a/Framework/Geometry/test/ReferenceFrameTest.h
+++ b/Framework/Geometry/test/ReferenceFrameTest.h
@@ -103,7 +103,7 @@ public:
 
   void testIdenticalUpAndBeamDirectionsThrow() {
     TS_ASSERT_THROWS(ReferenceFrame(X, X, Right, "source"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetUpDirectionVector() {
diff --git a/Framework/Geometry/test/ReflectionConditionTest.h b/Framework/Geometry/test/ReflectionConditionTest.h
index 63758402eaaae9f388876b11ce673c287ea1da23..b49262445949ef37ea1f42881c515a6d1c0b7d94 100644
--- a/Framework/Geometry/test/ReflectionConditionTest.h
+++ b/Framework/Geometry/test/ReflectionConditionTest.h
@@ -108,7 +108,7 @@ public:
     }
 
     TS_ASSERT_THROWS(getReflectionConditionByName("invalid"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_getReflectionConditionBySymbol() {
@@ -120,7 +120,7 @@ public:
     }
 
     TS_ASSERT_THROWS(getReflectionConditionBySymbol("Q"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Geometry/test/SampleEnvironmentFactoryTest.h b/Framework/Geometry/test/SampleEnvironmentFactoryTest.h
index 751205f037d42c487fd7cd80f78e2cde4000f82f..070f320a48a1de4bcc7670d15ca4a716c4a7f9c9 100644
--- a/Framework/Geometry/test/SampleEnvironmentFactoryTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentFactoryTest.h
@@ -62,14 +62,14 @@ public:
     SampleEnvironmentFactory factory(
         Mantid::Kernel::make_unique<NullSampleEnvSpecFinder>());
     TS_ASSERT_THROWS(factory.create("unknown", "unknown", "unknown", "unknown"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Known_Specification_Unknown_Container_Throws() {
     SampleEnvironmentFactory factory(
         Mantid::Kernel::make_unique<TestSampleEnvSpecFinder>());
     TS_ASSERT_THROWS(factory.create("unknown", "unknown", "CRYO001", "unknown"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   //----------------------------------------------------------------------------
diff --git a/Framework/Geometry/test/SampleEnvironmentSpecFileFinderTest.h b/Framework/Geometry/test/SampleEnvironmentSpecFileFinderTest.h
index 474ab114e7b9c2f0f8f8bd0b4200e2c72bf063f9..28b3e847fe4cdc1585b76e7ce79de4be55992bdb 100644
--- a/Framework/Geometry/test/SampleEnvironmentSpecFileFinderTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentSpecFileFinderTest.h
@@ -104,35 +104,35 @@ public:
   void test_Finder_Throws_If_Empty_Directory_List_Given() {
     std::vector<std::string> empty;
     TS_ASSERT_THROWS(SampleEnvironmentSpecFileFinder finder(empty),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Finder_Throws_If_Facility_Correct_Instrument_Incorrect() {
     SampleEnvironmentSpecFileFinder finder(
         std::vector<std::string>(1, m_testRoot));
     TS_ASSERT_THROWS(finder.find(m_facilityName, "unknown", m_envName),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Finder_Throws_If_Facility_Incorrect_Instrument_Correct() {
     SampleEnvironmentSpecFileFinder finder(
         std::vector<std::string>(1, m_testRoot));
     TS_ASSERT_THROWS(finder.find("unknown", m_instName, m_envName),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Finder_Throws_If_Facility_Instrument_Correct_Bad_Environment() {
     SampleEnvironmentSpecFileFinder finder(
         std::vector<std::string>(1, m_testRoot));
     TS_ASSERT_THROWS(finder.find(m_facilityName, m_instName, "unknown"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Finder_Throws_If_Filename_Found_But_Content_Invalid() {
     SampleEnvironmentSpecFileFinder finder(
         std::vector<std::string>(1, m_testRoot));
     TS_ASSERT_THROWS(finder.find(m_facilityName, m_instName, m_badName),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h b/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h
index 01365d629285be7feb17e271fb05d2e4544302e8..c3d3c063fe7cb1a5ca43589cff74ee8405d56aff 100644
--- a/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h
@@ -246,13 +246,13 @@ public:
     std::string xml;
     std::istringstream instream(xml);
     SampleEnvironmentSpecParser parser;
-    TS_ASSERT_THROWS(parser.parse("name", instream), std::runtime_error);
+    TS_ASSERT_THROWS(parser.parse("name", instream), const std::runtime_error &);
   }
 
   void test_Root_Tag_Must_Be_EnvironmentSpec() {
     TS_ASSERT_THROWS(parseSpec("name", "<materials>"
                                        "</materials>"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Missing_Geometry_Tag_Under_Can_Throws_Error() {
@@ -281,7 +281,7 @@ public:
                                "  </containers>"
                                " </components>"
                                "</environmentspec>"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Missing_Can_ID_Throws_Error() {
@@ -310,7 +310,7 @@ public:
                                "  </containers>"
                                " </components>"
                                "</environmentspec>"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Missing_Material_For_Can_Throws_Error() {
@@ -339,7 +339,7 @@ public:
                                "  </containers>"
                                " </components>"
                                "</environmentspec>"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   //----------------------------------------------------------------------------
diff --git a/Framework/Geometry/test/SampleEnvironmentSpecTest.h b/Framework/Geometry/test/SampleEnvironmentSpecTest.h
index 9221b051f360eb36c6257989a74dab1c618b9cd0..fb06d6f834f0449d695b444d6f61846588096295 100644
--- a/Framework/Geometry/test/SampleEnvironmentSpecTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentSpecTest.h
@@ -89,21 +89,21 @@ public:
     SampleEnvironmentSpec spec("CRYO-001");
     auto testContainer = boost::make_shared<const Container>("");
 
-    TS_ASSERT_THROWS(spec.addContainer(testContainer), std::invalid_argument);
+    TS_ASSERT_THROWS(spec.addContainer(testContainer), const std::invalid_argument &);
   }
 
   void test_Find_Throws_If_ID_Not_Found() {
     using Mantid::Geometry::Container;
     SampleEnvironmentSpec spec("CRYO-001");
 
-    TS_ASSERT_THROWS(spec.findContainer("8mm"), std::invalid_argument);
+    TS_ASSERT_THROWS(spec.findContainer("8mm"), const std::invalid_argument &);
   }
 
   void test_BuildEnvironment_Throws_If_ID_Not_Found() {
     using Mantid::Geometry::Container;
     SampleEnvironmentSpec spec("CRYO-001");
 
-    TS_ASSERT_THROWS(spec.buildEnvironment("8mm"), std::invalid_argument);
+    TS_ASSERT_THROWS(spec.buildEnvironment("8mm"), const std::invalid_argument &);
   }
 };
 
diff --git a/Framework/Geometry/test/SampleEnvironmentTest.h b/Framework/Geometry/test/SampleEnvironmentTest.h
index 9ffe251dd53a50d8cc7b25542b6ca4bb578b9e12..0586b9ceb8e5dab0dc65602eca2b572ee9f4e7a9 100644
--- a/Framework/Geometry/test/SampleEnvironmentTest.h
+++ b/Framework/Geometry/test/SampleEnvironmentTest.h
@@ -160,7 +160,7 @@ public:
     TS_ASSERT_THROWS(kit->generatePoint(rng,
                                         kit->getContainer().getBoundingBox(),
                                         maxAttempts),
-                     std::runtime_error);
+                     const std::runtime_error &);
     Mock::VerifyAndClearExpectations(&rng);
   }
 
diff --git a/Framework/Geometry/test/SpaceGroupFactoryTest.h b/Framework/Geometry/test/SpaceGroupFactoryTest.h
index 6133cebe6869d54283455d0755919782776d1a6f..905013af63212e8e15e7793a22821241ef48be53 100644
--- a/Framework/Geometry/test/SpaceGroupFactoryTest.h
+++ b/Framework/Geometry/test/SpaceGroupFactoryTest.h
@@ -49,7 +49,7 @@ public:
 
     // subscribing twice does not work
     TS_ASSERT_THROWS(factory.subscribeGeneratedSpaceGroup(2, "P-1", "-x,-y,-z"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // but having a different symbol for the same number is ok.
     TS_ASSERT_THROWS_NOTHING(
@@ -58,11 +58,11 @@ public:
     // neither does with a tabulated space group
     TS_ASSERT_THROWS(
         factory.subscribeTabulatedSpaceGroup(2, "P-1", "x,y,z; -x,-y,-z"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // Different number with same symbol - does not work
     TS_ASSERT_THROWS(factory.subscribeGeneratedSpaceGroup(3, "P-1", "-x,-y,-z"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // invalid generators are caught before anything is done
     TS_ASSERT_THROWS_ANYTHING(
@@ -87,7 +87,7 @@ public:
     // subscribing twice does not work
     TS_ASSERT_THROWS(
         factory.subscribeTabulatedSpaceGroup(2, "P-1", "x,y,z; -x,-y,-z"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // but having a different symbol for the same number is ok.
     TS_ASSERT_THROWS_NOTHING(
@@ -95,11 +95,11 @@ public:
 
     // neither does with a generated space group
     TS_ASSERT_THROWS(factory.subscribeGeneratedSpaceGroup(2, "P-1", "-x,-y,-z"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // Different number with same symbol - does not work
     TS_ASSERT_THROWS(factory.subscribeTabulatedSpaceGroup(3, "P-1", "-x,-y,-z"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // invalid generators are caught before anything is done
     TS_ASSERT_THROWS_ANYTHING(
@@ -209,7 +209,7 @@ public:
     TestableSpaceGroupFactory factory;
 
     TS_ASSERT_THROWS(factory.unsubscribeSpaceGroup("P-1"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(
         factory.subscribeTabulatedSpaceGroup(2, "P-1", "x,y,z; -x,-y,-z"));
@@ -285,7 +285,7 @@ public:
     TransformationSpaceGroupGenerator generator(1, "fake symbol",
                                                 "Fake base symbol | -x+z,y,-x");
 
-    TS_ASSERT_THROWS(generator.getPrototype(), std::invalid_argument);
+    TS_ASSERT_THROWS(generator.getPrototype(), const std::invalid_argument &);
   }
 
   void testTransformationSpaceGroupGenerator_succeeds_with_registered_base() {
@@ -326,7 +326,7 @@ public:
   void test_OperatorSymOpString_too_short() {
     std::vector<std::string> strings{"a", "b"};
     TS_ASSERT_THROWS(SymmetryOperation("x,y,z") * strings,
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_OperatorSymOpString_correctness() {
diff --git a/Framework/Geometry/test/StructuredDetectorTest.h b/Framework/Geometry/test/StructuredDetectorTest.h
index 379ad49be76e38138bf99920afce3ca4ce51de2b..1b4074b46581f694529b7306636e00233778e1c7 100644
--- a/Framework/Geometry/test/StructuredDetectorTest.h
+++ b/Framework/Geometry/test/StructuredDetectorTest.h
@@ -36,7 +36,7 @@ public:
     TS_ASSERT_EQUALS(q.getR().size(), 0);
     TS_ASSERT_EQUALS(q.getG().size(), 0);
     TS_ASSERT_EQUALS(q.getB().size(), 0);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "");
     TS_ASSERT(!q.getParent());
@@ -59,8 +59,8 @@ public:
     TS_ASSERT_EQUALS(q.getG().size(), 0);
     TS_ASSERT_EQUALS(q.getB().size(), 0);
 
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
-    TS_ASSERT_THROWS(q[0], std::runtime_error);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
+    TS_ASSERT_THROWS(q[0], const std::runtime_error &);
 
     TS_ASSERT_EQUALS(q.getName(), "Name");
     TS_ASSERT(!q.getParent());
@@ -90,7 +90,7 @@ public:
     TS_ASSERT_EQUALS(q->getG().size(), 0);
     TS_ASSERT_EQUALS(q->getB().size(), 0);
 
-    TS_ASSERT_THROWS((*q)[0], std::runtime_error);
+    TS_ASSERT_THROWS((*q)[0], const std::runtime_error &);
     // check the parent
     TS_ASSERT(q->getParent());
     TS_ASSERT_EQUALS(q->getParent()->getName(), parent->getName());
@@ -155,7 +155,7 @@ public:
         "StructuredDetectors created with beams not aligned "
         "along the z-axis should fail.",
         det->initialize(2, 2, std::move(x), std::move(y), false, 0, true, 2, 1),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     delete det;
   }
@@ -175,7 +175,7 @@ public:
     // Initialize with these parameters
     TS_ASSERT_THROWS(
         det->initialize(2, 2, std::move(x), std::move(y), true, 0, true, 2, 1),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     x2.resize(3);
     auto x3 = x2;
@@ -183,14 +183,14 @@ public:
 
     TS_ASSERT_THROWS(det->initialize(2, 2, std::move(x2), std::move(y2), true,
                                      0, true, 2, 1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     x3.resize(0);
     y3.resize(0);
 
     TS_ASSERT_THROWS(det->initialize(2, 2, std::move(x3), std::move(y3), true,
                                      0, true, 2, 1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     delete det;
   }
@@ -208,10 +208,10 @@ public:
     TS_ASSERT_EQUALS(det->getYValues().size(), size);
 
     // Go out of bounds
-    TS_ASSERT_THROWS(det->getAtXY(-1, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(0, -1), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(5, 0), std::runtime_error);
-    TS_ASSERT_THROWS(det->getAtXY(0, 6), std::runtime_error);
+    TS_ASSERT_THROWS(det->getAtXY(-1, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(0, -1), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(5, 0), const std::runtime_error &);
+    TS_ASSERT_THROWS(det->getAtXY(0, 6), const std::runtime_error &);
 
     // Check some ids
     TS_ASSERT_EQUALS(det->getAtXY(0, 0)->getID(), 0);
diff --git a/Framework/Geometry/test/SymmetryElementFactoryTest.h b/Framework/Geometry/test/SymmetryElementFactoryTest.h
index 3e9ea9036ef4cbdd40f377869d0b97aa3597135c..9af13028c0dc94b34dc537e6db5acdcd4fe8db6e 100644
--- a/Framework/Geometry/test/SymmetryElementFactoryTest.h
+++ b/Framework/Geometry/test/SymmetryElementFactoryTest.h
@@ -358,7 +358,7 @@ public:
     TS_ASSERT_THROWS(factory.subscribeSymmetryElementGenerator<
                          TestableSymmetryElementMirrorGenerator>(
                          "SymmetryElementMirrorGenerator"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testSymmetryElementFactoryCreateSymElem() {
diff --git a/Framework/Geometry/test/SymmetryElementTest.h b/Framework/Geometry/test/SymmetryElementTest.h
index de6a6a19910adc110f8ec9d454eef2a3d97fb9b6..42c0ae97380c98ce4a5f7c97f949a62d90eb2554 100644
--- a/Framework/Geometry/test/SymmetryElementTest.h
+++ b/Framework/Geometry/test/SymmetryElementTest.h
@@ -86,7 +86,7 @@ public:
 
     TS_ASSERT_THROWS(MockSymmetryElementWithAxis invalidElement(
                          "41", V3R(0, 0, 0), translation),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(
         MockSymmetryElementWithAxis axisElement("41", axis, translation));
diff --git a/Framework/Geometry/test/SymmetryOperationFactoryTest.h b/Framework/Geometry/test/SymmetryOperationFactoryTest.h
index 062dae4fd4eaa47759c703702f759626af75f4c9..3331d6263c99c9761020e30bb4fa6caea977ce2f 100644
--- a/Framework/Geometry/test/SymmetryOperationFactoryTest.h
+++ b/Framework/Geometry/test/SymmetryOperationFactoryTest.h
@@ -39,7 +39,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         SymmetryOperationFactory::Instance().createSymOp("x,y,z"));
     TS_ASSERT_THROWS(SymmetryOperationFactory::Instance().createSymOp("fake2"),
-                     Mantid::Kernel::Exception::ParseError);
+                     const Mantid::Kernel::Exception::ParseError &);
 
     // createSymOp also works when an operation is not subscribed
     TS_ASSERT_THROWS_NOTHING(
@@ -75,7 +75,7 @@ public:
     opStrings.emplace_back("doesNotWork");
     TS_ASSERT_THROWS(
         symOps = SymmetryOperationFactory::Instance().createSymOps(opStrings),
-        Mantid::Kernel::Exception::ParseError);
+        const Mantid::Kernel::Exception::ParseError &);
   }
 
   void testCreateSymOpsString() {
@@ -95,10 +95,10 @@ public:
 
     TS_ASSERT_THROWS(
         SymmetryOperationFactory::Instance().createSymOps(invalidSep),
-        Mantid::Kernel::Exception::ParseError);
+        const Mantid::Kernel::Exception::ParseError &);
     TS_ASSERT_THROWS(
         SymmetryOperationFactory::Instance().createSymOps(invalidOne),
-        Mantid::Kernel::Exception::ParseError);
+        const Mantid::Kernel::Exception::ParseError &);
   }
 
   void testUnsubscribe() {
diff --git a/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h b/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h
index cc9ec84cd89ac4af9e2b93ba9e79257884db3b64..1619daa3d6363e8bb7649b8a981c5bb7d50d85cc 100644
--- a/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h
+++ b/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h
@@ -39,13 +39,13 @@ public:
 
     TS_ASSERT_THROWS(
         TestableSymmetryOperationSymbolParser::parseIdentifier("1/4, x, -z-x"),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         TestableSymmetryOperationSymbolParser::parseIdentifier("x, -z-x"),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         TestableSymmetryOperationSymbolParser::parseIdentifier("y, x, -z-x, z"),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testGetNormalizedIdentifier() {
diff --git a/Framework/Geometry/test/SymmetryOperationTest.h b/Framework/Geometry/test/SymmetryOperationTest.h
index 3cbee17cacd33d3407953386f6b7c6f4db67c11c..2448598a68f8ea2d4b268255a7aaddae6cfccb3a 100644
--- a/Framework/Geometry/test/SymmetryOperationTest.h
+++ b/Framework/Geometry/test/SymmetryOperationTest.h
@@ -268,7 +268,7 @@ public:
     for (int i = 1; i < 10; ++i) {
       randMatrix.setRandom(1, -i, i);
       TS_ASSERT_THROWS(symOp.getOrderFromMatrix(randMatrix),
-                       std::runtime_error);
+                       const std::runtime_error &);
     }
   }
 
@@ -346,12 +346,12 @@ public:
     // no []
     std::stringstream invalidBrackets;
     invalidBrackets << "x,-y,z";
-    TS_ASSERT_THROWS(invalidBrackets >> mirror, std::runtime_error);
+    TS_ASSERT_THROWS(invalidBrackets >> mirror, const std::runtime_error &);
 
     // invalid string
     std::stringstream invalid;
     invalid << "[someString]";
-    TS_ASSERT_THROWS(invalid >> mirror, Exception::ParseError);
+    TS_ASSERT_THROWS(invalid >> mirror, const Exception::ParseError &);
   }
 
 private:
diff --git a/Framework/Geometry/test/TorusTest.h b/Framework/Geometry/test/TorusTest.h
index a404448d0fe19391cd949babbc3ccde09d5ebce7..dbee2f014ffd478083c7703249e38299590bc092 100644
--- a/Framework/Geometry/test/TorusTest.h
+++ b/Framework/Geometry/test/TorusTest.h
@@ -23,7 +23,8 @@ class TorusTest : public CxxTest::TestSuite {
 
 public:
   void testEmptyConstructor() {
-    TS_ASSERT_THROWS(Torus A;, Mantid::Kernel::Exception::NotImplementedError)
+    TS_ASSERT_THROWS(Torus A;
+                     , const Mantid::Kernel::Exception::NotImplementedError &)
     //		TS_ASSERT_EQUALS(extractString(A),"-1 tx [0,0,0] 0 0 0\n");
     //		TS_ASSERT_EQUALS(A.getCentre(),V3D(0,0,0));
     //		TS_ASSERT_EQUALS(A.getNormal(),V3D(1.0,0.0,0.0));
diff --git a/Framework/Geometry/test/UnitCellTest.h b/Framework/Geometry/test/UnitCellTest.h
index 358f5c88ac46d3c22acbcce595cf9d1c147d26cc..c06952fe67de587b94cc23f3286b2e88e5b63fd4 100644
--- a/Framework/Geometry/test/UnitCellTest.h
+++ b/Framework/Geometry/test/UnitCellTest.h
@@ -23,7 +23,7 @@ class UnitCellTest : public CxxTest::TestSuite {
 public:
   void testInvalidParametersThrow() {
     TSM_ASSERT_THROWS("Should throw if matrix is not invertible!",
-                      UnitCell(0, 0, 0, 0, 0, 0), std::range_error);
+                      UnitCell(0, 0, 0, 0, 0, 0), const std::range_error &);
   }
 
   void test_Simple() {
@@ -120,7 +120,7 @@ public:
   }
   void test_UnitCellCrash() {
     TS_ASSERT_THROWS(UnitCell(10.4165, 3.4165, 10.4165, 30, 45, 80);
-                     , std::invalid_argument);
+                     , const std::invalid_argument &);
   }
 
   void test_printing() {
diff --git a/Framework/Geometry/test/V3RTest.h b/Framework/Geometry/test/V3RTest.h
index 6454e469758d292e01ca6c47ec0dda473da17dd0..afe3adaf9499106d3e2e66e73ea4dac466b54755 100644
--- a/Framework/Geometry/test/V3RTest.h
+++ b/Framework/Geometry/test/V3RTest.h
@@ -46,7 +46,7 @@ public:
 
     std::vector<int> bad(4, 1);
     TS_ASSERT_THROWS(V3R rationalIntVecBad(bad),
-                     Mantid::Kernel::Exception::MisMatch<size_t>);
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &);
 
     // copy constructor
     V3R copied(rational);
@@ -84,13 +84,13 @@ public:
     TS_ASSERT_EQUALS(vector[0], 1);
     TS_ASSERT_EQUALS(vector[1], 2);
     TS_ASSERT_EQUALS(vector[2], 3);
-    TS_ASSERT_THROWS(vector[3], Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS(vector[3], const Mantid::Kernel::Exception::IndexError &);
 
     TS_ASSERT_THROWS_NOTHING(vector[0] = RationalNumber(2, 3));
     TS_ASSERT_THROWS_NOTHING(vector[1] = RationalNumber(2, 3));
     TS_ASSERT_THROWS_NOTHING(vector[2] = RationalNumber(2, 3));
     TS_ASSERT_THROWS(vector[3] = RationalNumber(2, 3),
-                     Mantid::Kernel::Exception::IndexError);
+                     const Mantid::Kernel::Exception::IndexError &);
   }
 
   void testIntegerAddition() {
@@ -165,7 +165,7 @@ public:
     vector *= 2;
     TS_ASSERT_EQUALS(vector, originalVector);
 
-    TS_ASSERT_THROWS(vector / 0, boost::bad_rational);
+    TS_ASSERT_THROWS(vector / 0, const boost::bad_rational &);
   }
 
   void testRationalAddition() {
@@ -406,10 +406,11 @@ public:
     // wrong sizes
     IntMatrix wrongOne(3, 4);
     TS_ASSERT_THROWS(wrongOne * vector,
-                     Mantid::Kernel::Exception::MisMatch<size_t>);
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &);
 
     IntMatrix wrongTwo(4, 3);
-    TS_ASSERT_THROWS(wrongTwo * vector, Mantid::Kernel::Exception::IndexError);
+    TS_ASSERT_THROWS(wrongTwo * vector,
+                     const Mantid::Kernel::Exception::IndexError &);
 
     // Smaller works
     IntMatrix wrongThree(2, 3);
diff --git a/Framework/Geometry/test/XMLInstrumentParameterTest.h b/Framework/Geometry/test/XMLInstrumentParameterTest.h
index c5c069bb9d64a82698cfb492141ed593b2144bc8..b16fbcce39dd4e6d1c96caad6109d06be50f73e5 100644
--- a/Framework/Geometry/test/XMLInstrumentParameterTest.h
+++ b/Framework/Geometry/test/XMLInstrumentParameterTest.h
@@ -63,7 +63,7 @@ public:
 
     TSM_ASSERT_THROWS("Unknown flag should cause failure",
                       logFile->createParamValue(&series),
-                      Kernel::Exception::InstrumentDefinitionError)
+                      const Kernel::Exception::InstrumentDefinitionError &)
   }
 
   void test_filter_by_first_value() {
diff --git a/Framework/HistogramData/test/AddableTest.h b/Framework/HistogramData/test/AddableTest.h
index 0db860e7be30da2397def9f913e1edb7725a359b..27a5e1aee8c7dc53ba441b0fcce830d3c15304d5 100644
--- a/Framework/HistogramData/test/AddableTest.h
+++ b/Framework/HistogramData/test/AddableTest.h
@@ -79,10 +79,10 @@ public:
   void test_length_mismatch() {
     AddableTester rhs1{1, 2};
     const AddableTester rhs2{1, 2, 3};
-    TS_ASSERT_THROWS(rhs1 + rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 - rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 += rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 -= rhs2, std::runtime_error);
+    TS_ASSERT_THROWS(rhs1 + rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 - rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 += rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 -= rhs2, const std::runtime_error &);
   }
 
   void test_with_FixedLengthVector() {
diff --git a/Framework/HistogramData/test/CountStandardDeviationsTest.h b/Framework/HistogramData/test/CountStandardDeviationsTest.h
index 7963837e849677bc644e1f1c3796255285d9f3b5..eb7f17978abe97986c63ba55dbfb5636e7fd6542 100644
--- a/Framework/HistogramData/test/CountStandardDeviationsTest.h
+++ b/Framework/HistogramData/test/CountStandardDeviationsTest.h
@@ -57,28 +57,28 @@ public:
     const FrequencyStandardDeviations frequencies(0);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const CountStandardDeviations counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_empty_FrequencyStandardDeviations_size_mismatch() {
     const FrequencyStandardDeviations frequencies(0);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const CountStandardDeviations counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyStandardDeviations_null_BinEdges() {
     const FrequencyStandardDeviations frequencies(1);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const CountStandardDeviations counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyStandardDeviations_size_mismatch() {
     const FrequencyStandardDeviations frequencies(2);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const CountStandardDeviations counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyStandardDeviations() {
diff --git a/Framework/HistogramData/test/CountVariancesTest.h b/Framework/HistogramData/test/CountVariancesTest.h
index 7b87f37142df0a95b21ba076e54872ab38d258b2..e50be62dd973fee2f9e0a991178be209927c42a5 100644
--- a/Framework/HistogramData/test/CountVariancesTest.h
+++ b/Framework/HistogramData/test/CountVariancesTest.h
@@ -64,28 +64,28 @@ public:
     const FrequencyVariances frequencies(0);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const CountVariances counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_empty_FrequencyVariances_size_mismatch() {
     const FrequencyVariances frequencies(0);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const CountVariances counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyVariances_null_BinEdges() {
     const FrequencyVariances frequencies(1);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const CountVariances counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyVariances_size_mismatch() {
     const FrequencyVariances frequencies(2);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const CountVariances counts(frequencies, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_FrequencyVariances() {
diff --git a/Framework/HistogramData/test/CountsTest.h b/Framework/HistogramData/test/CountsTest.h
index 84df2b18741eeaeb4962d9c288102a161254cad2..c4b950c9253982d590474fd3af72ee0786c8a075 100644
--- a/Framework/HistogramData/test/CountsTest.h
+++ b/Framework/HistogramData/test/CountsTest.h
@@ -59,25 +59,29 @@ public:
   void test_construct_from_empty_Frequencies_null_BinEdges() {
     const Frequencies frequencies(0);
     const BinEdges edges{};
-    TS_ASSERT_THROWS(const Counts counts(frequencies, edges), std::logic_error);
+    TS_ASSERT_THROWS(const Counts counts(frequencies, edges),
+                     const std::logic_error &);
   }
 
   void test_construct_from_empty_Frequencies_size_mismatch() {
     const Frequencies frequencies(0);
     const BinEdges edges{1.0, 2.0};
-    TS_ASSERT_THROWS(const Counts counts(frequencies, edges), std::logic_error);
+    TS_ASSERT_THROWS(const Counts counts(frequencies, edges),
+                     const std::logic_error &);
   }
 
   void test_construct_from_Frequencies_null_BinEdges() {
     const Frequencies frequencies(1);
     const BinEdges edges{};
-    TS_ASSERT_THROWS(const Counts counts(frequencies, edges), std::logic_error);
+    TS_ASSERT_THROWS(const Counts counts(frequencies, edges),
+                     const std::logic_error &);
   }
 
   void test_construct_from_Frequencies_size_mismatch() {
     const Frequencies frequencies(2);
     const BinEdges edges{1.0, 2.0};
-    TS_ASSERT_THROWS(const Counts counts(frequencies, edges), std::logic_error);
+    TS_ASSERT_THROWS(const Counts counts(frequencies, edges),
+                     const std::logic_error &);
   }
 
   void test_construct_from_Frequencies() {
diff --git a/Framework/HistogramData/test/EstimatePolynomialTest.h b/Framework/HistogramData/test/EstimatePolynomialTest.h
index b221cfca3e7c2deaea8bbcd26412c5592254773b..727e7c1ad623e4c88c8e08ed90ddcffb58b28e5f 100644
--- a/Framework/HistogramData/test/EstimatePolynomialTest.h
+++ b/Framework/HistogramData/test/EstimatePolynomialTest.h
@@ -39,13 +39,13 @@ public:
     // bad order
     TS_ASSERT_THROWS(Mantid::HistogramData::estimatePolynomial(
                          3, histo, 0, histo.size(), bg0, bg1, bg2, chisq),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // bad range i_max < i_min
     TS_ASSERT_THROWS(estimatePolynomial(2, histo, 1, 0, bg0, bg1, bg2, chisq),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // bad range x.size() < i_max
     TS_ASSERT_THROWS(estimatePolynomial(2, histo, 0, 30, bg0, bg1, bg2, chisq),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_FlatData() {
diff --git a/Framework/HistogramData/test/FixedLengthVectorTest.h b/Framework/HistogramData/test/FixedLengthVectorTest.h
index 85d801a2d1b70a0a9badb336048b33b93af6792d..a97f709a66ab4249398fe29c68be8c1cd73e5732 100644
--- a/Framework/HistogramData/test/FixedLengthVectorTest.h
+++ b/Framework/HistogramData/test/FixedLengthVectorTest.h
@@ -137,7 +137,8 @@ public:
     std::vector<double> src(10, 0);
     FixedLengthVectorTester dest(5);
 
-    TS_ASSERT_THROWS(dest.assign(src.cbegin(), src.cend()), std::logic_error);
+    TS_ASSERT_THROWS(dest.assign(src.cbegin(), src.cend()),
+                     const std::logic_error &);
   }
 
   void test_length_value_assignment() {
@@ -155,7 +156,7 @@ public:
   void test_value_assignment_fail() {
     FixedLengthVectorTester dest(3);
 
-    TS_ASSERT_THROWS(dest.assign(20, 4.5), std::logic_error);
+    TS_ASSERT_THROWS(dest.assign(20, 4.5), const std::logic_error &);
   }
 
   void test_copy_assignment() {
@@ -170,7 +171,7 @@ public:
   void test_copy_assignment_fail() {
     const FixedLengthVectorTester src(2, 0.1);
     FixedLengthVectorTester dest(1);
-    TS_ASSERT_THROWS(dest = src, std::logic_error);
+    TS_ASSERT_THROWS(dest = src, const std::logic_error &);
   }
 
   void test_move_assignment() {
@@ -185,7 +186,7 @@ public:
   void test_move_assignment_fail() {
     FixedLengthVectorTester src(2, 0.1);
     FixedLengthVectorTester dest(1);
-    TS_ASSERT_THROWS(dest = std::move(src), std::logic_error);
+    TS_ASSERT_THROWS(dest = std::move(src), const std::logic_error &);
   }
 
   void test_initializer_list_assignment() {
@@ -206,7 +207,7 @@ public:
 
   void test_initializer_list_assignment_fail() {
     FixedLengthVectorTester values(2);
-    TS_ASSERT_THROWS((values = {0.1, 0.2, 0.3}), std::logic_error);
+    TS_ASSERT_THROWS((values = {0.1, 0.2, 0.3}), const std::logic_error &);
   }
 
   void test_vector_constructor() {
diff --git a/Framework/HistogramData/test/FrequenciesTest.h b/Framework/HistogramData/test/FrequenciesTest.h
index 562eeb44ac0ce5c0f482f032789b482277e52f93..15814270ae040dd44fce2ff54241e10a46587768 100644
--- a/Framework/HistogramData/test/FrequenciesTest.h
+++ b/Framework/HistogramData/test/FrequenciesTest.h
@@ -60,28 +60,28 @@ public:
     const Counts counts(0);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const Frequencies frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_empty_Counts_size_mismatch() {
     const Counts counts(0);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const Frequencies frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_Counts_null_BinEdges() {
     const Counts counts(1);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const Frequencies frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_Counts_size_mismatch() {
     const Counts counts(2);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const Frequencies frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_Counts() {
diff --git a/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h b/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h
index 09282c5914c2091f8918aa873fbd1536815dbf17..9e6c7acbdf99224330588a503d90546a6a072c2d 100644
--- a/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h
+++ b/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h
@@ -61,7 +61,7 @@ public:
     const BinEdges edges{};
     TS_ASSERT_THROWS(
         const FrequencyStandardDeviations frequencies(counts, edges),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_construct_from_empty_CountStandardDeviations_size_mismatch() {
@@ -69,7 +69,7 @@ public:
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(
         const FrequencyStandardDeviations frequencies(counts, edges),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_construct_from_CountStandardDeviations_null_BinEdges() {
@@ -77,7 +77,7 @@ public:
     const BinEdges edges{};
     TS_ASSERT_THROWS(
         const FrequencyStandardDeviations frequencies(counts, edges),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_construct_from_CountStandardDeviations_size_mismatch() {
@@ -85,7 +85,7 @@ public:
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(
         const FrequencyStandardDeviations frequencies(counts, edges),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_construct_from_CountStandardDeviations() {
diff --git a/Framework/HistogramData/test/FrequencyVariancesTest.h b/Framework/HistogramData/test/FrequencyVariancesTest.h
index 0ebf36a2183defdfee23d96289141184825a80bc..affb60844896611fac77673c0cdb6bd00ac79675 100644
--- a/Framework/HistogramData/test/FrequencyVariancesTest.h
+++ b/Framework/HistogramData/test/FrequencyVariancesTest.h
@@ -67,28 +67,28 @@ public:
     const CountVariances counts(0);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const FrequencyVariances frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_empty_CountVariances_size_mismatch() {
     const CountVariances counts(0);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const FrequencyVariances frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_CountVariances_null_BinEdges() {
     const CountVariances counts(1);
     const BinEdges edges{};
     TS_ASSERT_THROWS(const FrequencyVariances frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_CountVariances_size_mismatch() {
     const CountVariances counts(2);
     const BinEdges edges{1.0, 2.0};
     TS_ASSERT_THROWS(const FrequencyVariances frequencies(counts, edges),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_from_CountVariances() {
diff --git a/Framework/HistogramData/test/HistogramBuilderTest.h b/Framework/HistogramData/test/HistogramBuilderTest.h
index 1958ea7ffe51a0f297c30bed04f1d175b472fe86..12c5fb9cc14a479d308629e3c8675649777a5435 100644
--- a/Framework/HistogramData/test/HistogramBuilderTest.h
+++ b/Framework/HistogramData/test/HistogramBuilderTest.h
@@ -42,11 +42,11 @@ public:
     HistogramBuilder builder;
     builder.setX(5);
     builder.setY(3);
-    TS_ASSERT_THROWS(builder.build(), std::logic_error);
+    TS_ASSERT_THROWS(builder.build(), const std::logic_error &);
     builder.setY(6);
-    TS_ASSERT_THROWS(builder.build(), std::logic_error);
+    TS_ASSERT_THROWS(builder.build(), const std::logic_error &);
     builder.setDx(3);
-    TS_ASSERT_THROWS(builder.build(), std::logic_error);
+    TS_ASSERT_THROWS(builder.build(), const std::logic_error &);
   }
 
   void test_build_from_size() {
diff --git a/Framework/HistogramData/test/HistogramMathTest.h b/Framework/HistogramData/test/HistogramMathTest.h
index 3e6acad91aabe12b7690a0be82181a93a59ed4e1..dc78cc219f0108b1687de46651cebb5ad3463304 100644
--- a/Framework/HistogramData/test/HistogramMathTest.h
+++ b/Framework/HistogramData/test/HistogramMathTest.h
@@ -84,13 +84,13 @@ public:
 
   void test_bad_factors() {
     Histogram hist(BinEdges{1, 2, 3}, Counts{4, 9});
-    TS_ASSERT_THROWS(hist *= (-1.0), std::runtime_error);
-    TS_ASSERT_THROWS(hist * (-1.0), std::runtime_error);
-    TS_ASSERT_THROWS((-1.0) * hist, std::runtime_error);
-    TS_ASSERT_THROWS(hist /= (-1.0), std::runtime_error);
-    TS_ASSERT_THROWS(hist / (-1.0), std::runtime_error);
-    TS_ASSERT_THROWS(hist /= 0.0, std::runtime_error);
-    TS_ASSERT_THROWS(hist / 0.0, std::runtime_error);
+    TS_ASSERT_THROWS(hist *= (-1.0), const std::runtime_error &);
+    TS_ASSERT_THROWS(hist * (-1.0), const std::runtime_error &);
+    TS_ASSERT_THROWS((-1.0) * hist, const std::runtime_error &);
+    TS_ASSERT_THROWS(hist /= (-1.0), const std::runtime_error &);
+    TS_ASSERT_THROWS(hist / (-1.0), const std::runtime_error &);
+    TS_ASSERT_THROWS(hist /= 0.0, const std::runtime_error &);
+    TS_ASSERT_THROWS(hist / 0.0, const std::runtime_error &);
   }
 
   void test_plus_histogram() {
@@ -119,25 +119,25 @@ public:
   void test_plus_histogram_fail_xMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(Points{1, 2, 3}, Counts{1, 2, 3});
-    TS_ASSERT_THROWS(hist1 + hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 + hist2, const std::runtime_error &);
   }
 
   void test_plus_histogram_fail_yMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2, 3}, Frequencies{4, 9});
-    TS_ASSERT_THROWS(hist1 + hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 + hist2, const std::runtime_error &);
   }
 
   void test_plus_histogram_fail_x_length_mismatch() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2}, Counts{1});
-    TS_ASSERT_THROWS(hist1 + hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 + hist2, const std::runtime_error &);
   }
 
   void test_plus_histogram_fail_x_value_mismatch() {
     const Histogram hist1(BinEdges{1, 2.0, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2.1, 3}, Counts{1, 2});
-    TS_ASSERT_THROWS(hist1 + hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 + hist2, const std::runtime_error &);
   }
 
   void test_minus_histogram() {
@@ -168,25 +168,25 @@ public:
   void test_minus_histogram_fail_xMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(Points{1, 2, 3}, Counts{1, 2, 3});
-    TS_ASSERT_THROWS(hist1 - hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 - hist2, const std::runtime_error &);
   }
 
   void test_minus_histogram_fail_yMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2, 3}, Frequencies{4, 9});
-    TS_ASSERT_THROWS(hist1 - hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 - hist2, const std::runtime_error &);
   }
 
   void test_minus_histogram_fail_x_length_mismatch() {
     const Histogram hist1(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2}, Counts{1});
-    TS_ASSERT_THROWS(hist1 - hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 - hist2, const std::runtime_error &);
   }
 
   void test_minus_histogram_fail_x_value_mismatch() {
     const Histogram hist1(BinEdges{1, 2.0, 3}, Counts{4, 9});
     const Histogram hist2(BinEdges{1, 2.1, 3}, Counts{1, 2});
-    TS_ASSERT_THROWS(hist1 - hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 - hist2, const std::runtime_error &);
   }
 
   void test_times_histogram() {
@@ -233,13 +233,13 @@ public:
   void test_times_histogram_fail_xMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Frequencies{4, 9});
     const Histogram hist2(Points{1, 2, 3}, Frequencies{1, 2, 3});
-    TS_ASSERT_THROWS(hist1 * hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 * hist2, const std::runtime_error &);
   }
 
   void test_times_histogram_fail_yMode() {
     const Histogram histC(BinEdges{1, 2, 3}, Counts{4, 9});
     const Histogram histF(BinEdges{1, 2, 3}, Frequencies{4, 9});
-    TS_ASSERT_THROWS(histC * histC, std::runtime_error);
+    TS_ASSERT_THROWS(histC * histC, const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(histC * histF);
     TS_ASSERT_THROWS_NOTHING(histF * histC);
     TS_ASSERT_THROWS_NOTHING(histF * histF);
@@ -248,13 +248,13 @@ public:
   void test_times_histogram_fail_x_length_mismatch() {
     const Histogram hist1(BinEdges{1, 2, 3}, Frequencies{4, 9});
     const Histogram hist2(BinEdges{1, 2}, Frequencies{1});
-    TS_ASSERT_THROWS(hist1 * hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 * hist2, const std::runtime_error &);
   }
 
   void test_times_histogram_fail_x_value_mismatch() {
     const Histogram hist1(BinEdges{1, 2.0, 3}, Frequencies{4, 9});
     const Histogram hist2(BinEdges{1, 2.1, 3}, Frequencies{1, 2});
-    TS_ASSERT_THROWS(hist1 * hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 * hist2, const std::runtime_error &);
   }
 
   void test_divide_histogram() {
@@ -303,7 +303,7 @@ public:
   void test_divide_histogram_fail_xMode() {
     const Histogram hist1(BinEdges{1, 2, 3}, Frequencies{4, 9});
     const Histogram hist2(Points{1, 2, 3}, Frequencies{1, 2, 3});
-    TS_ASSERT_THROWS(hist1 / hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 / hist2, const std::runtime_error &);
   }
 
   void test_divide_histogram_fail_yMode() {
@@ -311,20 +311,20 @@ public:
     const Histogram histF(BinEdges{1, 2, 3}, Frequencies{4, 9});
     TS_ASSERT_THROWS_NOTHING(histC / histC);
     TS_ASSERT_THROWS_NOTHING(histC / histF);
-    TS_ASSERT_THROWS(histF / histC, std::runtime_error);
+    TS_ASSERT_THROWS(histF / histC, const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(histF / histF);
   }
 
   void test_divide_histogram_fail_x_length_mismatch() {
     const Histogram hist1(BinEdges{1, 2, 3}, Frequencies{4, 9});
     const Histogram hist2(BinEdges{1, 2}, Frequencies{1});
-    TS_ASSERT_THROWS(hist1 / hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 / hist2, const std::runtime_error &);
   }
 
   void test_divide_histogram_fail_x_value_mismatch() {
     const Histogram hist1(BinEdges{1, 2.0, 3}, Frequencies{4, 9});
     const Histogram hist2(BinEdges{1, 2.1, 3}, Frequencies{1, 2});
-    TS_ASSERT_THROWS(hist1 / hist2, std::runtime_error);
+    TS_ASSERT_THROWS(hist1 / hist2, const std::runtime_error &);
   }
 };
 
diff --git a/Framework/HistogramData/test/HistogramTest.h b/Framework/HistogramData/test/HistogramTest.h
index 90323dd1aa8052e5580622417f3aafc6cd99e5ac..248b52aacbb857599c31b132b461ac788c93563e 100644
--- a/Framework/HistogramData/test/HistogramTest.h
+++ b/Framework/HistogramData/test/HistogramTest.h
@@ -14,20 +14,20 @@
 #include "MantidHistogramData/LinearGenerator.h"
 
 using Mantid::HistogramData::BinEdges;
+using Mantid::HistogramData::Counts;
 using Mantid::HistogramData::CountStandardDeviations;
 using Mantid::HistogramData::CountVariances;
-using Mantid::HistogramData::Counts;
 using Mantid::HistogramData::Frequencies;
 using Mantid::HistogramData::FrequencyStandardDeviations;
 using Mantid::HistogramData::FrequencyVariances;
+using Mantid::HistogramData::getHistogramXMode;
 using Mantid::HistogramData::Histogram;
 using Mantid::HistogramData::HistogramE;
 using Mantid::HistogramData::HistogramX;
 using Mantid::HistogramData::HistogramY;
 using Mantid::HistogramData::LinearGenerator;
-using Mantid::HistogramData::PointStandardDeviations;
 using Mantid::HistogramData::Points;
-using Mantid::HistogramData::getHistogramXMode;
+using Mantid::HistogramData::PointStandardDeviations;
 
 class HistogramTest : public CxxTest::TestSuite {
 public:
@@ -68,7 +68,7 @@ public:
 
   void test_construct_from_invalid_BinEdges() {
     BinEdges binEdges(1);
-    TS_ASSERT_THROWS(Histogram{binEdges}, std::logic_error);
+    TS_ASSERT_THROWS(Histogram{binEdges}, const std::logic_error &);
   }
 
   void test_construct_Points_Counts() {
@@ -87,25 +87,26 @@ public:
   }
 
   void test_construct_values_size_mismatch() {
-    TS_ASSERT_THROWS(Histogram(Points(1), Counts(2)), std::logic_error);
+    TS_ASSERT_THROWS(Histogram(Points(1), Counts(2)), const std::logic_error &);
     TS_ASSERT_THROWS(Histogram(BinEdges{1.0, 2.0}, Counts(2)),
-                     std::logic_error);
-    TS_ASSERT_THROWS(Histogram(Points(1), Frequencies(2)), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(Histogram(Points(1), Frequencies(2)),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(Histogram(BinEdges{1.0, 2.0}, Frequencies(2)),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_values_uncertainties_size_mismatch() {
     TS_ASSERT_THROWS(Histogram(Points{1.0, 2.0}, Counts(2), CountVariances(1)),
-                     std::logic_error);
+                     const std::logic_error &);
     TS_ASSERT_THROWS(
         Histogram(Points{1.0, 2.0}, Frequencies(2), FrequencyVariances(1)),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_construct_null_values_but_uncertainties_fail() {
     TS_ASSERT_THROWS(Histogram(Points{1.0, 2.0}, Counts(), CountVariances(2)),
-                     std::logic_error);
+                     const std::logic_error &);
   }
 
   void test_construct_Counts_automatic_errors() {
@@ -212,9 +213,9 @@ public:
     TS_ASSERT_EQUALS(getHistogramXMode(1, 1), Histogram::XMode::Points);
     TS_ASSERT_EQUALS(getHistogramXMode(1, 0), Histogram::XMode::BinEdges);
     TS_ASSERT_EQUALS(getHistogramXMode(2, 1), Histogram::XMode::BinEdges);
-    TS_ASSERT_THROWS(getHistogramXMode(2, 0), std::logic_error);
-    TS_ASSERT_THROWS(getHistogramXMode(3, 1), std::logic_error);
-    TS_ASSERT_THROWS(getHistogramXMode(0, 1), std::logic_error);
+    TS_ASSERT_THROWS(getHistogramXMode(2, 0), const std::logic_error &);
+    TS_ASSERT_THROWS(getHistogramXMode(3, 1), const std::logic_error &);
+    TS_ASSERT_THROWS(getHistogramXMode(0, 1), const std::logic_error &);
   }
 
   void test_assignment() {
@@ -357,33 +358,40 @@ public:
 
   void test_setPoints_size_mismatch() {
     Histogram h1(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h1.setPoints(std::vector<double>(1)), std::logic_error);
+    TS_ASSERT_THROWS(h1.setPoints(std::vector<double>(1)),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h1.setPoints(std::vector<double>{1.0, 2.0, 3.0}),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h1.setPoints(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setPoints(Points{1.0, 2.0, 3.0}), std::logic_error);
-    TS_ASSERT_THROWS(h1.setPoints(BinEdges{1.0, 2.0}), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setPoints(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setPoints(Points{1.0, 2.0, 3.0}),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setPoints(BinEdges{1.0, 2.0}),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h1.setPoints(BinEdges{1.0, 2.0, 3.0, 4.0}),
-                     std::logic_error);
+                     const std::logic_error &);
     Histogram h2(BinEdges{1.0, 2.0});
-    TS_ASSERT_THROWS(h2.setPoints(std::vector<double>(0)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setPoints(std::vector<double>(0)),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h2.setPoints(std::vector<double>{1.0, 2.0}),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(Points(0)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(Points{1.0, 2.0}), std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(BinEdges(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(BinEdges{1.0, 2.0, 3.0}), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(Points(0)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(Points{1.0, 2.0}), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(BinEdges(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(BinEdges{1.0, 2.0, 3.0}),
+                     const std::logic_error &);
   }
 
   void test_setPoints_size_mismatch_degenerate() {
     Histogram h1(Points(0));
-    TS_ASSERT_THROWS(h1.setPoints(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setPoints(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setPoints(BinEdges(1)), std::logic_error);
+    TS_ASSERT_THROWS(h1.setPoints(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setPoints(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setPoints(BinEdges(1)), const std::logic_error &);
     Histogram h2(BinEdges(0));
-    TS_ASSERT_THROWS(h2.setPoints(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setPoints(BinEdges(1)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setPoints(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setPoints(BinEdges(1)), const std::logic_error &);
   }
 
   void test_setPoints_self_assignment() {
@@ -407,7 +415,7 @@ public:
     auto &x = h.x();
     // This test makes sure that size mismatch takes precedence over the
     // self-assignment check. x is bin edges, setting it as points should fail.
-    TS_ASSERT_THROWS(h.setPoints(x), std::logic_error);
+    TS_ASSERT_THROWS(h.setPoints(x), const std::logic_error &);
   }
 
   void test_setPoints_keepsDxStorageMode() {
@@ -509,33 +517,40 @@ public:
   void test_setBinEdges_size_mismatch() {
     Histogram h1(Points{1.0, 2.0});
     TS_ASSERT_THROWS(h1.setBinEdges(std::vector<double>{1.0, 2.0}),
-                     std::logic_error);
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h1.setBinEdges(std::vector<double>{1.0, 2.0, 3.0, 4.0}),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h1.setBinEdges(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setBinEdges(Points{1.0, 2.0, 3.0}), std::logic_error);
-    TS_ASSERT_THROWS(h1.setBinEdges(BinEdges{1.0, 2.0}), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setBinEdges(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setBinEdges(Points{1.0, 2.0, 3.0}),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setBinEdges(BinEdges{1.0, 2.0}),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h1.setBinEdges(BinEdges{1.0, 2.0, 3.0, 4.0}),
-                     std::logic_error);
+                     const std::logic_error &);
     Histogram h2(BinEdges{1.0, 2.0});
-    TS_ASSERT_THROWS(h2.setBinEdges(std::vector<double>(1)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setBinEdges(std::vector<double>(1)),
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h2.setBinEdges(std::vector<double>{1.0, 2.0, 3.0}),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(Points(0)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(Points{1.0, 2.0}), std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges{1.0, 2.0, 3.0}), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(Points(0)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(Points{1.0, 2.0}),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges{1.0, 2.0, 3.0}),
+                     const std::logic_error &);
   }
 
   void test_setBinEdges_size_mismatch_degenerate() {
     Histogram h1(Points(0));
-    TS_ASSERT_THROWS(h1.setBinEdges(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setBinEdges(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setBinEdges(BinEdges(1)), std::logic_error);
+    TS_ASSERT_THROWS(h1.setBinEdges(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setBinEdges(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setBinEdges(BinEdges(1)), const std::logic_error &);
     Histogram h2(BinEdges(0));
-    TS_ASSERT_THROWS(h2.setBinEdges(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(Points(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges(1)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setBinEdges(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(Points(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setBinEdges(BinEdges(1)), const std::logic_error &);
   }
 
   void test_setBinEdges_self_assignment() {
@@ -559,7 +574,7 @@ public:
     auto &x = h.x();
     // This test makes sure that size mismatch takes precedence over the
     // self-assignment check. x is points, setting it as bin edges should fail.
-    TS_ASSERT_THROWS(h.setBinEdges(x), std::logic_error);
+    TS_ASSERT_THROWS(h.setBinEdges(x), const std::logic_error &);
   }
 
   void test_setBinEdges_keepsDxStorageMode() {
@@ -574,24 +589,30 @@ public:
 
   void test_setCounts_size_mismatch() {
     Histogram h1(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(3)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setCounts(Counts(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setCounts(Counts(3)), std::logic_error);
+    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(3)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setCounts(Counts(1)), const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setCounts(Counts(3)), const std::logic_error &);
     Histogram h2(BinEdges{1.0, 2.0});
-    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(0)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(2)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setCounts(Counts(0)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setCounts(Counts(2)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(0)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(2)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setCounts(Counts(0)), const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setCounts(Counts(2)), const std::logic_error &);
   }
 
   void test_setCounts_size_mismatch_degenerate() {
     Histogram h1(Points(0));
-    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setCounts(Counts(1)), std::logic_error);
+    TS_ASSERT_THROWS(h1.setCounts(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setCounts(Counts(1)), const std::logic_error &);
     Histogram h2(BinEdges(0));
-    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(1)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setCounts(Counts(1)), std::logic_error);
+    TS_ASSERT_THROWS(h2.setCounts(std::vector<double>(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setCounts(Counts(1)), const std::logic_error &);
   }
 
   void test_setCounts_self_assignment() {
@@ -615,29 +636,35 @@ public:
   void test_setFrequencies_size_mismatch() {
     Histogram h1(Points{1.0, 2.0});
     TS_ASSERT_THROWS(h1.setFrequencies(std::vector<double>(1)),
-                     std::logic_error);
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h1.setFrequencies(std::vector<double>(3)),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(1)), std::logic_error);
-    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(3)), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(1)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(3)),
+                     const std::logic_error &);
     Histogram h2(BinEdges{1.0, 2.0});
     TS_ASSERT_THROWS(h2.setFrequencies(std::vector<double>(0)),
-                     std::logic_error);
+                     const std::logic_error &);
     TS_ASSERT_THROWS(h2.setFrequencies(std::vector<double>(2)),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(0)), std::logic_error);
-    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(2)), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(0)),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(2)),
+                     const std::logic_error &);
   }
 
   void test_setFrequencies_size_mismatch_degenerate() {
     Histogram h1(Points(0));
     TS_ASSERT_THROWS(h1.setFrequencies(std::vector<double>(1)),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(1)), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h1.setFrequencies(Frequencies(1)),
+                     const std::logic_error &);
     Histogram h2(BinEdges(0));
     TS_ASSERT_THROWS(h2.setFrequencies(std::vector<double>(1)),
-                     std::logic_error);
-    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(1)), std::logic_error);
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h2.setFrequencies(Frequencies(1)),
+                     const std::logic_error &);
   }
 
   void test_setFrequencies_self_assignment() {
@@ -703,26 +730,28 @@ public:
 
   void test_setCountVariances_size_mismatch() {
     Histogram h(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h.setCountVariances(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setCountVariances(3), std::logic_error);
+    TS_ASSERT_THROWS(h.setCountVariances(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setCountVariances(3), const std::logic_error &);
   }
 
   void test_setCountStandardDeviations_size_mismatch() {
     Histogram h(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h.setCountStandardDeviations(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setCountStandardDeviations(3), std::logic_error);
+    TS_ASSERT_THROWS(h.setCountStandardDeviations(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setCountStandardDeviations(3), const std::logic_error &);
   }
 
   void test_setFrequencyVariances_size_mismatch() {
     Histogram h(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h.setFrequencyVariances(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyVariances(3), std::logic_error);
+    TS_ASSERT_THROWS(h.setFrequencyVariances(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyVariances(3), const std::logic_error &);
   }
 
   void test_setFrequencyStandardDeviations_size_mismatch() {
     Histogram h(Points{1.0, 2.0});
-    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(3), std::logic_error);
+    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(1),
+                     const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(3),
+                     const std::logic_error &);
   }
 
   void test_error_setter_self_assignment() {
@@ -732,9 +761,10 @@ public:
     auto old_address = &e;
     // e is always count standard deviations, self assignment as variances or
     // frequencies should fail unless we are setting count standard deviations.
-    TS_ASSERT_THROWS(h.setCountVariances(e), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyVariances(e), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(e), std::logic_error);
+    TS_ASSERT_THROWS(h.setCountVariances(e), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyVariances(e), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(e),
+                     const std::logic_error &);
     TS_ASSERT_THROWS_NOTHING(h.setCountStandardDeviations(e));
     TS_ASSERT_EQUALS(&h.e(), old_address);
   }
@@ -798,14 +828,15 @@ public:
     auto tmp = {1.0, 2.0};
     auto data2 = Mantid::Kernel::make_cow<HistogramX>(tmp);
     Histogram hist{BinEdges(data1)};
-    TS_ASSERT_THROWS(hist.setSharedX(data2), std::logic_error);
+    TS_ASSERT_THROWS(hist.setSharedX(data2), const std::logic_error &);
   }
 
   void test_setSharedX_catches_misuse() {
     BinEdges edges{1.0, 2.0};
     Histogram hist(edges);
     auto points = hist.points();
-    TS_ASSERT_THROWS(hist.setSharedX(points.cowData()), std::logic_error);
+    TS_ASSERT_THROWS(hist.setSharedX(points.cowData()),
+                     const std::logic_error &);
   }
 
   void test_y() {
@@ -868,7 +899,7 @@ public:
     auto data2 = Mantid::Kernel::make_cow<HistogramY>(2);
     Histogram hist{BinEdges(0)};
     hist.setCounts(data1);
-    TS_ASSERT_THROWS(hist.setSharedY(data2), std::logic_error);
+    TS_ASSERT_THROWS(hist.setSharedY(data2), const std::logic_error &);
   }
 
   void test_e() {
@@ -931,7 +962,7 @@ public:
     auto data2 = Mantid::Kernel::make_cow<HistogramE>(2);
     Histogram hist{BinEdges(0)};
     hist.setCountStandardDeviations(data1);
-    TS_ASSERT_THROWS(hist.setSharedE(data2), std::logic_error);
+    TS_ASSERT_THROWS(hist.setSharedE(data2), const std::logic_error &);
   }
 
   void test_setPointStandardDeviations_point_data() {
@@ -947,13 +978,13 @@ public:
     Histogram hist(Points(2));
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(0)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(1)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(3)),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_setPointStandardDeviations_histogram_data() {
@@ -969,13 +1000,13 @@ public:
     Histogram hist(BinEdges(3));
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(0)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(1)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(
         hist.setPointStandardDeviations(PointStandardDeviations(3)),
-        std::logic_error);
+        const std::logic_error &);
   }
 
   void test_setPointStandardDeviations_can_set_null() {
@@ -1045,22 +1076,24 @@ public:
 
   void test_yMode_cannot_be_changed_by_Count_setters() {
     Histogram h(Points(1), Counts(1));
-    TS_ASSERT_THROWS(h.setFrequencies(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyVariances(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(1), std::logic_error);
+    TS_ASSERT_THROWS(h.setFrequencies(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyVariances(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setFrequencyStandardDeviations(1),
+                     const std::logic_error &);
   }
 
   void test_yMode_cannot_be_changed_by_Frequency_setters() {
     Histogram h(Points(1), Frequencies(1));
-    TS_ASSERT_THROWS(h.setCounts(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setCountVariances(1), std::logic_error);
-    TS_ASSERT_THROWS(h.setCountStandardDeviations(1), std::logic_error);
+    TS_ASSERT_THROWS(h.setCounts(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setCountVariances(1), const std::logic_error &);
+    TS_ASSERT_THROWS(h.setCountStandardDeviations(1), const std::logic_error &);
   }
 
   void test_setSharedY_fails_for_YMode_Uninitialized() {
     Histogram hist(Points(1));
     Counts counts(1);
-    TS_ASSERT_THROWS(hist.setSharedY(counts.cowData()), std::logic_error);
+    TS_ASSERT_THROWS(hist.setSharedY(counts.cowData()),
+                     const std::logic_error &);
   }
 
   void test_that_can_change_histogram_size_for_points_with_dx() {
diff --git a/Framework/HistogramData/test/InterpolateTest.h b/Framework/HistogramData/test/InterpolateTest.h
index f158d7845e4937a51a274d5b7a014537ef791948..39011654638306f1319f09004134a769c724d096 100644
--- a/Framework/HistogramData/test/InterpolateTest.h
+++ b/Framework/HistogramData/test/InterpolateTest.h
@@ -258,33 +258,33 @@ public:
   void test_interpolatelinear_throws_for_undefined_ymode_type() {
     TS_ASSERT_THROWS(
         interpolateLinear(Histogram(Points(10, LinearGenerator(0, 0.5))), 10),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_interpolatelinear_throws_if_number_points_less_than_3() {
     TS_ASSERT_THROWS(
         interpolateLinear(Histogram(Points(2, LinearGenerator(0, 0.5))), 1),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         interpolateLinear(Histogram(Points(2, LinearGenerator(0, 0.5))), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_interpolatelinearinplace_throws_if_input_has_less_than_2_points() {
     Histogram input(Points(1, LinearGenerator(0.1, 0.1)));
     Histogram output(Points(1, LinearGenerator(0.1, 0.1)));
     TS_ASSERT_THROWS(interpolateLinearInplace(input, output),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 
   void
   test_interpolatelinear_throws_if_stepsize_greater_or_equal_number_points() {
     TS_ASSERT_THROWS(
         interpolateLinear(Histogram(Points(6, LinearGenerator(0, 0.5))), 6),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         interpolateLinear(Histogram(Points(6, LinearGenerator(0, 0.5))), 7),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   // ---------------------------------------------------------------------------
@@ -293,33 +293,33 @@ public:
   void test_interpolatecspline_throws_for_undefined_ymode_type() {
     TS_ASSERT_THROWS(
         interpolateCSpline(Histogram(Points(10, LinearGenerator(0, 0.5))), 10),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_interpolatecspline_throws_if_less_than_4_calculated_points() {
     TS_ASSERT_THROWS(
         interpolateCSpline(Histogram(Points(2, LinearGenerator(0, 0.5))), 1),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         interpolateCSpline(Histogram(Points(3, LinearGenerator(0, 0.5))), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_interpolatecsplineinplace_throws_if_input_has_less_than_3_points() {
     Histogram input(Points(2, LinearGenerator(0, 1.0)));
     Histogram output(Points(5, LinearGenerator(0.1, 0.1)));
     TS_ASSERT_THROWS(interpolateCSplineInplace(input, output),
-                     std::runtime_error)
+                     const std::runtime_error &)
   }
 
   void
   test_interpolatecspline_throws_if_stepsize_greater_or_equal_number_points() {
     TS_ASSERT_THROWS(
         interpolateCSpline(Histogram(Points(6, LinearGenerator(0, 0.5))), 6),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS(
         interpolateCSpline(Histogram(Points(6, LinearGenerator(0, 0.5))), 7),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/Framework/HistogramData/test/MultipliableTest.h b/Framework/HistogramData/test/MultipliableTest.h
index af1c6335f5839ab1a2b577e177b16daafd7c8c15..877d4da6d2e43a2193cf91c293b57f96a5279dc7 100644
--- a/Framework/HistogramData/test/MultipliableTest.h
+++ b/Framework/HistogramData/test/MultipliableTest.h
@@ -79,10 +79,10 @@ public:
   void test_length_mismatch() {
     MultipliableTester rhs1{1, 2};
     const MultipliableTester rhs2{1, 2, 3};
-    TS_ASSERT_THROWS(rhs1 * rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 / rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 *= rhs2, std::runtime_error);
-    TS_ASSERT_THROWS(rhs1 /= rhs2, std::runtime_error);
+    TS_ASSERT_THROWS(rhs1 * rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 / rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 *= rhs2, const std::runtime_error &);
+    TS_ASSERT_THROWS(rhs1 /= rhs2, const std::runtime_error &);
   }
 
   void test_with_FixedLengthVector() {
diff --git a/Framework/HistogramData/test/PointsTest.h b/Framework/HistogramData/test/PointsTest.h
index 433462dca33e26014d9ea143879a8a150000f75a..f2581c52dcaf48fe64cc6a38031961af5acddc5e 100644
--- a/Framework/HistogramData/test/PointsTest.h
+++ b/Framework/HistogramData/test/PointsTest.h
@@ -53,7 +53,7 @@ public:
 
   void test_construct_from_invalid_BinEdges() {
     const BinEdges edges(1);
-    TS_ASSERT_THROWS(Points points(edges), std::logic_error);
+    TS_ASSERT_THROWS(Points points(edges), const std::logic_error &);
   }
 
   void test_construct_from_BinEdges() {
diff --git a/Framework/HistogramData/test/RebinTest.h b/Framework/HistogramData/test/RebinTest.h
index 990f562e7fd17ef5dff794c400afc0e36a3a3edf..b13c3a342def71f40362998e4b5a104745a600cf 100644
--- a/Framework/HistogramData/test/RebinTest.h
+++ b/Framework/HistogramData/test/RebinTest.h
@@ -43,32 +43,35 @@ public:
     Counts counts{10, 1, 3, 4, 7};
     // X Mode Points
     TS_ASSERT_THROWS(rebin(Histogram(points, counts), edges),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // No YMode set
     TS_ASSERT_THROWS(
         rebin(Histogram(BinEdges(10, LinearGenerator(0, 0.5))), edges),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testRebinFailsCentralBinEdgesInvalid() {
     std::vector<double> binEdges{1, 2, 3, 3, 5, 7};
     BinEdges edges(binEdges);
 
-    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges), InvalidBinEdgesError);
+    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges),
+                     const InvalidBinEdgesError &);
   }
 
   void testRebinFailsStartBinEdgesInvalid() {
     std::vector<double> binEdges{1, 1, 3, 4, 5, 7};
     BinEdges edges(binEdges);
 
-    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges), InvalidBinEdgesError);
+    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges),
+                     const InvalidBinEdgesError &);
   }
 
   void testRebinEndCentralBinEdgesInvalid() {
     std::vector<double> binEdges{1, 2, 3, 4, 5, 5};
     BinEdges edges(binEdges);
 
-    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges), InvalidBinEdgesError);
+    TS_ASSERT_THROWS(rebin(getCountsHistogram(), edges),
+                     const InvalidBinEdgesError &);
   }
 
   void testNegativeBinEdges() {
@@ -85,7 +88,7 @@ public:
     Histogram hist(BinEdges(std::move(binEdges)), Counts(5, 10));
     BinEdges edges{1, 2, 3, 4, 5, 6};
 
-    TS_ASSERT_THROWS(rebin(hist, edges), InvalidBinEdgesError);
+    TS_ASSERT_THROWS(rebin(hist, edges), const InvalidBinEdgesError &);
   }
 
   void testRebinFailsInputAndOutputBinEdgesInvalid() {
@@ -93,7 +96,7 @@ public:
     Histogram hist(BinEdges(binEdges), Counts(5, 10));
     BinEdges edges(std::move(binEdges));
 
-    TS_ASSERT_THROWS(rebin(hist, edges), InvalidBinEdgesError);
+    TS_ASSERT_THROWS(rebin(hist, edges), const InvalidBinEdgesError &);
   }
 
   void testRebinIdenticalBins() {
diff --git a/Framework/ICat/test/CatalogLoginTest.h b/Framework/ICat/test/CatalogLoginTest.h
index 580e9c7782fe89a4fad8cc23c5de83b45cd5700e..ed9d73d3060159a30c622c0cbf9203872a3d6d7b 100644
--- a/Framework/ICat/test/CatalogLoginTest.h
+++ b/Framework/ICat/test/CatalogLoginTest.h
@@ -37,7 +37,7 @@ public:
       loginobj.initialize();
 
     // Should fail because mandatory parameter has not been set
-    TS_ASSERT_THROWS(loginobj.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(loginobj.execute(), const std::runtime_error &);
   }
 
   void testLogin() {
diff --git a/Framework/ICat/test/CatalogSearchTest.h b/Framework/ICat/test/CatalogSearchTest.h
index c2c5936b6839504c0e8cf2f9302938175b678e0c..5e3c6f43fc4e0713480e4642b8d67a5c0ba81ddb 100644
--- a/Framework/ICat/test/CatalogSearchTest.h
+++ b/Framework/ICat/test/CatalogSearchTest.h
@@ -127,13 +127,13 @@ public:
                            ": Invalid Date:date format must be DD/MM/YYYY";
 
     TS_ASSERT_THROWS(searchobj.setPropertyValue("StartDate", "sssss"),
-                     std::invalid_argument(errorMsg));
+                     const std::invalid_argument &);
 
     errorMsg = "Invalid value for property EndDate (string) "
                "aaaaa"
                ": Invalid Date:date format must be DD/MM/YYYY";
     TS_ASSERT_THROWS(searchobj.setPropertyValue("EndDate", "aaaaa"),
-                     std::invalid_argument(errorMsg));
+                     const std::invalid_argument &);
 
     ICatTestHelper::logout();
   }
@@ -152,14 +152,14 @@ public:
                            ": Invalid Date:Day part of the Date parameter must "
                            "be between 1 and 31";
     TS_ASSERT_THROWS(searchobj.setPropertyValue("StartDate", "39/22/2009"),
-                     std::invalid_argument(errorMsg));
+                     const std::invalid_argument &);
 
     errorMsg = "Invalid value for property EndDate (string) "
                "1/22/2009"
                ": Invalid Date:Month part of the Date parameter must be "
                "between 1 and 12";
     TS_ASSERT_THROWS(searchobj.setPropertyValue("EndDate", "1/22/2009"),
-                     std::invalid_argument(errorMsg));
+                     const std::invalid_argument &);
 
     ICatTestHelper::logout();
   }
diff --git a/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h b/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h
index 1d1eef6c645699e89bb8c740669bb6501d6d0a9b..0bfdf8ea65f9eb693254b8cbacf4dfd3f673cfe7 100644
--- a/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h
+++ b/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h
@@ -67,7 +67,9 @@ private:
   spectrumNumbers(const std::vector<GlobalSpectrumIndex> &globalIndices) const;
 
   struct SpectrumNumberHash {
-    std::size_t operator()(const SpectrumNumber &spectrumNumber) const {
+    // Pass-by-value as qualifiers ignored on cast result type and
+    // SpectrumNumber is a trivial type (int32_t).
+    std::size_t operator()(SpectrumNumber spectrumNumber) const {
       return std::hash<std::int32_t>()(static_cast<int32_t>(spectrumNumber));
     }
   };
diff --git a/Framework/Indexing/test/GroupTest.h b/Framework/Indexing/test/GroupTest.h
index 89393faf5c5fb95493cbbd289e73ad5b63c77a8c..aeae435b69cf203076ad5c748f0ae7ae700e771b 100644
--- a/Framework/Indexing/test/GroupTest.h
+++ b/Framework/Indexing/test/GroupTest.h
@@ -28,7 +28,7 @@ public:
     std::vector<std::vector<size_t>> grouping{{0}, {1}, {2}};
     std::vector<SpectrumNumber> specNums{4, 5};
     TS_ASSERT_THROWS(group(source, std::move(specNums), grouping),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_EQUALS(specNums.size(), 2);
   }
 
diff --git a/Framework/Indexing/test/IndexInfoTest.h b/Framework/Indexing/test/IndexInfoTest.h
index 64c57662fb3ce04ba6e9979f82a2deab8b4127bd..696459151c6897354430fb51736ded820b0a5dbd 100644
--- a/Framework/Indexing/test/IndexInfoTest.h
+++ b/Framework/Indexing/test/IndexInfoTest.h
@@ -61,7 +61,7 @@ void run_StorageMode_MasterOnly(const Parallel::Communicator &comm) {
     TS_ASSERT_EQUALS(i.spectrumNumber(2), 3);
   } else {
     TS_ASSERT_THROWS(IndexInfo(3, Parallel::StorageMode::MasterOnly, comm),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 }
 
@@ -246,7 +246,7 @@ public:
 
   void test_setSpectrumNumbers_size_mismatch() {
     IndexInfo t(3);
-    TS_ASSERT_THROWS(t.setSpectrumNumbers({1, 2}), std::runtime_error);
+    TS_ASSERT_THROWS(t.setSpectrumNumbers({1, 2}), const std::runtime_error &);
   }
 
   void test_setSpectrumDefinitions_size_mismatch() {
@@ -283,13 +283,13 @@ public:
     // break some things, so we forbid this for now.
     IndexInfo info(3);
     Kernel::cow_ptr<std::vector<SpectrumDefinition>> defs{nullptr};
-    TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), std::runtime_error);
+    TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), const std::runtime_error &);
   }
 
   void test_setSpectrumDefinitions_size_mismatch_cow_ptr() {
     IndexInfo info(3);
     const auto defs = Kernel::make_cow<std::vector<SpectrumDefinition>>(2);
-    TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), std::runtime_error);
+    TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), const std::runtime_error &);
   }
 
   void test_setSpectrumDefinitions_cow_ptr() {
diff --git a/Framework/Indexing/test/IndexSetTest.h b/Framework/Indexing/test/IndexSetTest.h
index 7108f6770e5cbcda0bf5ca9ff08a792546440161..67c477c65e2fb156e6eb33a7953f119a102f36d4 100644
--- a/Framework/Indexing/test/IndexSetTest.h
+++ b/Framework/Indexing/test/IndexSetTest.h
@@ -43,13 +43,13 @@ public:
 
   void test_rangeConstructorErrorCases() {
     // min negative
-    TS_ASSERT_THROWS(IndexSetTester set(-1, 2, 3), std::logic_error);
+    TS_ASSERT_THROWS(IndexSetTester set(-1, 2, 3), const std::logic_error &);
     // min > max
-    TS_ASSERT_THROWS(IndexSetTester set(2, 1, 3), std::logic_error);
+    TS_ASSERT_THROWS(IndexSetTester set(2, 1, 3), const std::logic_error &);
     // max above count
-    TS_ASSERT_THROWS(IndexSetTester set(1, 3, 3), std::out_of_range);
+    TS_ASSERT_THROWS(IndexSetTester set(1, 3, 3), const std::out_of_range &);
     // does it still fail if both are wrong?
-    TS_ASSERT_THROWS(IndexSetTester set(3, 3, 3), std::logic_error);
+    TS_ASSERT_THROWS(IndexSetTester set(3, 3, 3), const std::logic_error &);
   }
 
   void test_indexListConstructor() {
@@ -59,7 +59,7 @@ public:
   }
 
   void test_indexListConstructorErrorCases() {
-    TS_ASSERT_THROWS(IndexSetTester set({3}, 3), std::out_of_range);
+    TS_ASSERT_THROWS(IndexSetTester set({3}, 3), const std::out_of_range &);
   }
 
   void test_size() {
diff --git a/Framework/Indexing/test/PartitionerTest.h b/Framework/Indexing/test/PartitionerTest.h
index 14970ba936aa6a0ee12bb848a3ee33d28419f170..898554ebaf41cd111acf2314e3c935686a1361b2 100644
--- a/Framework/Indexing/test/PartitionerTest.h
+++ b/Framework/Indexing/test/PartitionerTest.h
@@ -40,8 +40,8 @@ public:
   static void destroySuite(PartitionerTest *suite) { delete suite; }
 
   void test_constructor_failures() {
-    TS_ASSERT_THROWS(PartitionerHelper(-1), std::logic_error);
-    TS_ASSERT_THROWS(PartitionerHelper(0), std::logic_error);
+    TS_ASSERT_THROWS(PartitionerHelper(-1), const std::logic_error &);
+    TS_ASSERT_THROWS(PartitionerHelper(0), const std::logic_error &);
     TS_ASSERT_THROWS_NOTHING(PartitionerHelper(
         1, PartitionIndex(13),
         Partitioner::MonitorStrategy::CloneOnEachPartition,
@@ -51,7 +51,7 @@ public:
             1, PartitionIndex(13),
             Partitioner::MonitorStrategy::DedicatedPartition,
             std::vector<GlobalSpectrumIndex>{GlobalSpectrumIndex(3)}),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS_NOTHING(PartitionerHelper(
         2, PartitionIndex(13), Partitioner::MonitorStrategy::DedicatedPartition,
         std::vector<GlobalSpectrumIndex>{GlobalSpectrumIndex(3)}));
@@ -67,10 +67,12 @@ public:
 
   void test_checkValid() {
     PartitionerHelper p(42);
-    TS_ASSERT_THROWS(p.checkValid(PartitionIndex(-1)), std::out_of_range);
+    TS_ASSERT_THROWS(p.checkValid(PartitionIndex(-1)),
+                     const std::out_of_range &);
     TS_ASSERT_THROWS_NOTHING(p.checkValid(PartitionIndex(0)));
     TS_ASSERT_THROWS_NOTHING(p.checkValid(PartitionIndex(41)));
-    TS_ASSERT_THROWS(p.checkValid(PartitionIndex(42)), std::out_of_range);
+    TS_ASSERT_THROWS(p.checkValid(PartitionIndex(42)),
+                     const std::out_of_range &);
   }
 
   void test_numberOfPartitions() {
diff --git a/Framework/Indexing/test/SpectrumNumberTranslatorTest.h b/Framework/Indexing/test/SpectrumNumberTranslatorTest.h
index 84e0e850b0301e2da7b58b83a9bed973f728619d..f4fa0435a7e2e80f0f15c1e621d3f7b02e42e211 100644
--- a/Framework/Indexing/test/SpectrumNumberTranslatorTest.h
+++ b/Framework/Indexing/test/SpectrumNumberTranslatorTest.h
@@ -148,7 +148,7 @@ public:
 
     spectrumNumbers[1] = 7; // 7 is not in parent.
     TS_ASSERT_THROWS(SpectrumNumberTranslator(spectrumNumbers, parent),
-                     std::out_of_range);
+                     const std::out_of_range &);
   }
 
   void test_access_bad_spectrum_numbers() {
@@ -169,9 +169,9 @@ public:
     // Access via spectrum numbers fails.
     TS_ASSERT_THROWS(
         translator.makeIndexSet(SpectrumNumber(2), SpectrumNumber(3)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(translator.makeIndexSet(makeSpectrumNumbers({1})),
-                     std::logic_error);
+                     const std::logic_error &);
     // Access via global spectrum index works.
     TS_ASSERT_THROWS_NOTHING(translator.makeIndexSet(GlobalSpectrumIndex(1),
                                                      GlobalSpectrumIndex(2)));
@@ -249,11 +249,11 @@ public:
   void test_makeIndexSet_minmax_range_failures() {
     auto t = makeTranslator(1, 0);
     TS_ASSERT_THROWS(t->makeIndexSet(SpectrumNumber(0), SpectrumNumber(5)),
-                     std::out_of_range);
+                     const std::out_of_range &);
     TS_ASSERT_THROWS(t->makeIndexSet(SpectrumNumber(1), SpectrumNumber(6)),
-                     std::out_of_range);
+                     const std::out_of_range &);
     TS_ASSERT_THROWS(t->makeIndexSet(SpectrumNumber(1), SpectrumNumber(3)),
-                     std::out_of_range);
+                     const std::out_of_range &);
   }
 
   void test_makeIndexSet_minmax_full_1_rank() {
@@ -314,21 +314,21 @@ public:
     auto t = makeTranslator(3, 1);
     TS_ASSERT_THROWS(
         t->makeIndexSet(GlobalSpectrumIndex(1), GlobalSpectrumIndex(0)),
-        std::logic_error);
+        const std::logic_error &);
     TS_ASSERT_THROWS(
         t->makeIndexSet(GlobalSpectrumIndex(0), GlobalSpectrumIndex(4)),
-        std::out_of_range);
+        const std::out_of_range &);
     TS_ASSERT_THROWS(
         t->makeIndexSet(GlobalSpectrumIndex(5), GlobalSpectrumIndex(4)),
-        std::logic_error);
+        const std::logic_error &);
     // -1 converted to size_t is positive and >> 1
     TS_ASSERT_THROWS(
         t->makeIndexSet(GlobalSpectrumIndex(-1), GlobalSpectrumIndex(1)),
-        std::logic_error);
+        const std::logic_error &);
     // -1 converted to size_t is > 0 but out of range
     TS_ASSERT_THROWS(
         t->makeIndexSet(GlobalSpectrumIndex(0), GlobalSpectrumIndex(-1)),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_makeIndexSet_minmax_GlobalSpectrumIndex_3_ranks() {
@@ -360,7 +360,7 @@ public:
   void test_makeIndexSet_partial_3_ranks_range_checks() {
     auto translator = makeTranslator(3, 1);
     TS_ASSERT_THROWS(translator->makeIndexSet(makeSpectrumNumbers({0})),
-                     std::out_of_range);
+                     const std::out_of_range &);
     // Index is not on this rank but it is correct.
     TS_ASSERT_THROWS_NOTHING(
         translator->makeIndexSet(makeSpectrumNumbers({2})));
@@ -393,9 +393,9 @@ public:
   void test_makeIndexSet_GlobalSpectrumIndex_partial_3_ranks_range_checks() {
     auto t = makeTranslator(3, 0);
     TS_ASSERT_THROWS(t->makeIndexSet(makeGlobalSpectrumIndices({-1})),
-                     std::out_of_range);
+                     const std::out_of_range &);
     TS_ASSERT_THROWS(t->makeIndexSet(makeGlobalSpectrumIndices({4})),
-                     std::out_of_range);
+                     const std::out_of_range &);
     // Index is not on this rank but it is correct.
     TS_ASSERT_THROWS_NOTHING(t->makeIndexSet(makeGlobalSpectrumIndices({1})));
     TS_ASSERT_EQUALS(t->makeIndexSet(makeGlobalSpectrumIndices({1})).size(), 0);
diff --git a/Framework/Kernel/test/ArrayPropertyTest.h b/Framework/Kernel/test/ArrayPropertyTest.h
index 9dad1852424c5dd740babb8a23d1c6258c6e7adb..efd130e652a0682b81e502a06015227f67b2ae32 100644
--- a/Framework/Kernel/test/ArrayPropertyTest.h
+++ b/Framework/Kernel/test/ArrayPropertyTest.h
@@ -149,9 +149,12 @@ public:
     TS_ASSERT(!s.operator()()[1].compare("b"))
     TS_ASSERT(!s.operator()()[2].compare("c"))
 
-    TS_ASSERT_THROWS(ArrayProperty<int> ii("ii", "aa,bb"), std::bad_cast)
-    TS_ASSERT_THROWS(ArrayProperty<int> ii("ii", "5.5,6.6"), std::bad_cast)
-    TS_ASSERT_THROWS(ArrayProperty<double> dd("dd", "aa,bb"), std::bad_cast)
+    TS_ASSERT_THROWS(ArrayProperty<int> ii("ii", "aa,bb"),
+                     const std::bad_cast &)
+    TS_ASSERT_THROWS(ArrayProperty<int> ii("ii", "5.5,6.6"),
+                     const std::bad_cast &)
+    TS_ASSERT_THROWS(ArrayProperty<double> dd("dd", "aa,bb"),
+                     const std::bad_cast &)
   }
 
   void testConstructorByString_long() {
diff --git a/Framework/Kernel/test/AtomTest.h b/Framework/Kernel/test/AtomTest.h
index 42008454e22af98dd7e39f26386ece61aba01ea2..f72ae778a25e63367bddcaf0bdbf57e0e8c085e4 100644
--- a/Framework/Kernel/test/AtomTest.h
+++ b/Framework/Kernel/test/AtomTest.h
@@ -37,8 +37,8 @@ public:
   }
 
   void testError() {
-    TS_ASSERT_THROWS(getAtom(1, 15), std::runtime_error);
-    TS_ASSERT_THROWS(getAtom("garbage"), std::runtime_error);
+    TS_ASSERT_THROWS(getAtom(1, 15), const std::runtime_error &);
+    TS_ASSERT_THROWS(getAtom("garbage"), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Kernel/test/BinaryFileTest.h b/Framework/Kernel/test/BinaryFileTest.h
index 9c396fd78a96b45133e56649edabcacbbfb29f2f..cb160d0f8cc82b29390170bb443d9819184f1ee7 100644
--- a/Framework/Kernel/test/BinaryFileTest.h
+++ b/Framework/Kernel/test/BinaryFileTest.h
@@ -62,13 +62,13 @@ public:
   BinaryFileTest() { dummy_file = "dummy.bin"; }
 
   void testFileNotFound() {
-    TS_ASSERT_THROWS(file.open("nonexistentfile.dat"), std::invalid_argument);
+    TS_ASSERT_THROWS(file.open("nonexistentfile.dat"), const std::invalid_argument &);
   }
 
   void testFileWrongSize() {
 
     MakeDummyFile(dummy_file, 3);
-    TS_ASSERT_THROWS(file.open(dummy_file), std::runtime_error);
+    TS_ASSERT_THROWS(file.open(dummy_file), const std::runtime_error &);
     file.close();
     Poco::File(dummy_file).remove();
   }
@@ -184,9 +184,9 @@ public:
     std::vector<DasEvent> data;
     DasEvent *buffer = nullptr;
     TS_ASSERT_EQUALS(file2.getNumElements(), 0);
-    TS_ASSERT_THROWS(file2.loadAll(), std::runtime_error);
-    TS_ASSERT_THROWS(data = file2.loadAllIntoVector(), std::runtime_error);
-    TS_ASSERT_THROWS(file2.loadBlock(buffer, 10), std::runtime_error);
+    TS_ASSERT_THROWS(file2.loadAll(), const std::runtime_error &);
+    TS_ASSERT_THROWS(data = file2.loadAllIntoVector(), const std::runtime_error &);
+    TS_ASSERT_THROWS(file2.loadBlock(buffer, 10), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Kernel/test/BinaryStreamReaderTest.h b/Framework/Kernel/test/BinaryStreamReaderTest.h
index da50c83fadbd434513b2cddd02817deb51fd1140..dd915b98f00c39085f1ee95f495e9adad740ef5a 100644
--- a/Framework/Kernel/test/BinaryStreamReaderTest.h
+++ b/Framework/Kernel/test/BinaryStreamReaderTest.h
@@ -239,7 +239,7 @@ public:
     int i(0);
     m_bytes >> i;
     TSM_ASSERT_THROWS("Expected a runtime_error when given a bad stream",
-                      BinaryStreamReader reader(m_bytes), std::runtime_error);
+                      BinaryStreamReader reader(m_bytes), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/Kernel/test/BoseEinsteinDistributionTest.h b/Framework/Kernel/test/BoseEinsteinDistributionTest.h
index 2822f7714bc60b0a3219f01990e860da0f839096..53b54ab9f5a73744b999fb89dedde4d9e5726b09 100644
--- a/Framework/Kernel/test/BoseEinsteinDistributionTest.h
+++ b/Framework/Kernel/test/BoseEinsteinDistributionTest.h
@@ -29,9 +29,9 @@ public:
     const double temperature = 35.0;
 
     TS_ASSERT_THROWS(BoseEinsteinDistribution::n(energy, temperature),
-                     std::domain_error);
+                     const std::domain_error &);
     TS_ASSERT_THROWS(BoseEinsteinDistribution::n(temperature, energy),
-                     std::domain_error);
+                     const std::domain_error &);
   }
 
   void
diff --git a/Framework/Kernel/test/ComputeResourceInfoTest.h b/Framework/Kernel/test/ComputeResourceInfoTest.h
index 46d975db7e2a7daeee95aa986e8d0038ac2aa1f1..607157e8ec658192cd65203e9eadec002a77dcf4 100644
--- a/Framework/Kernel/test/ComputeResourceInfoTest.h
+++ b/Framework/Kernel/test/ComputeResourceInfoTest.h
@@ -32,7 +32,7 @@ public:
     boost::shared_ptr<FacilityInfo> another;
     TS_ASSERT_THROWS(another = createCRInfoInMinimalFacility(
                          "<computeResource fooAtt=\"barVal\"/>"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT(!another);
   }
 
@@ -44,7 +44,7 @@ public:
                               "</computeResource>";
     boost::shared_ptr<FacilityInfo> fac;
     TS_ASSERT_THROWS(fac = createCRInfoInMinimalFacility(crTxt),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT(!fac);
   }
 
@@ -56,7 +56,7 @@ public:
                               "</compResource>";
     boost::shared_ptr<FacilityInfo> fac;
     TS_ASSERT_THROWS(fac = createCRInfoInMinimalFacility(crTxt),
-                     Poco::XML::XMLException);
+                     const Poco::XML::XMLException &);
     TS_ASSERT(!fac);
   }
 
@@ -103,7 +103,7 @@ public:
 
     boost::shared_ptr<FacilityInfo> fac;
     TS_ASSERT_THROWS(fac = createCRInfoInMinimalFacility(fermi),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     TS_ASSERT(!fac);
   }
diff --git a/Framework/Kernel/test/ConfigServiceTest.h b/Framework/Kernel/test/ConfigServiceTest.h
index 29acf971f64be3b4e056b011dffef80353dc6374..003c46cc3022969c7e16c5345bc2b60b4f4d95ea 100644
--- a/Framework/Kernel/test/ConfigServiceTest.h
+++ b/Framework/Kernel/test/ConfigServiceTest.h
@@ -146,10 +146,6 @@ public:
     ConfigService::Instance().setFacility("SNS");
     const FacilityInfo &fac1 = ConfigService::Instance().getFacility();
     TS_ASSERT_EQUALS(fac1.name(), "SNS");
-
-    //    // Non existent facility
-    //    TS_ASSERT_THROWS(ConfigService::Instance().setFacility(""),
-    //    Mantid::Kernel::Exception::NotFoundError);
   }
 
   void testFacilityList() {
@@ -187,7 +183,7 @@ public:
 
     // Check we throw the correct error for a nonsense beamline.
     // TS_ASSERT_THROWS(ConfigService::Instance().getInstrument("MyBeamline").name(),
-    // NotFoundError);
+    // const NotFoundError &);
 
     // Now find by using short name
     TS_ASSERT_EQUALS(ConfigService::Instance().getInstrument("BSS").name(),
diff --git a/Framework/Kernel/test/DataServiceTest.h b/Framework/Kernel/test/DataServiceTest.h
index f99466732b300d5d838cf8d019d7d28f26a5852b..8324c564a7b1086489396c6b59ca01a67358bcab 100644
--- a/Framework/Kernel/test/DataServiceTest.h
+++ b/Framework/Kernel/test/DataServiceTest.h
@@ -72,12 +72,12 @@ public:
     TS_ASSERT_EQUALS(svc.retrieve("anotherOne"), one);
 
     // Can't re-add the same name
-    TS_ASSERT_THROWS(svc.add("one", one), std::runtime_error);
+    TS_ASSERT_THROWS(svc.add("one", one), const std::runtime_error &);
     // Can't add blank name
-    TS_ASSERT_THROWS(svc.add("", one), std::runtime_error);
+    TS_ASSERT_THROWS(svc.add("", one), const std::runtime_error &);
     // Can't add empty pointer
     TS_ASSERT_THROWS(svc.add("Null", boost::shared_ptr<int>()),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     svc.add("__hidden", boost::make_shared<int>(99));
     TS_ASSERT_EQUALS(notificationFlag, 3)
@@ -133,10 +133,10 @@ public:
     TS_ASSERT_EQUALS(*svc.retrieve("one"), 2);
 
     // Can't add blank names
-    TS_ASSERT_THROWS(svc.addOrReplace("", two), std::runtime_error);
+    TS_ASSERT_THROWS(svc.addOrReplace("", two), const std::runtime_error &);
     // Can't add empty pointer
     TS_ASSERT_THROWS(svc.addOrReplace("one", boost::shared_ptr<int>()),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void handleBeforeReplaceNotification(
@@ -175,7 +175,7 @@ public:
         "anotherOne"); // Note: Rename is case-insensitive on the old name
     TS_ASSERT_EQUALS(svc.size(), 2);
     TSM_ASSERT_THROWS("One should have been renamed to anotherOne",
-                      svc.retrieve("one"), Exception::NotFoundError);
+                      svc.retrieve("one"), const Exception::NotFoundError &);
     TSM_ASSERT_EQUALS("One should have been renamed to anotherOne",
                       svc.retrieve("anotherOne"), one);
 
@@ -186,7 +186,7 @@ public:
     svc.rename("Two", "anotherOne");
     TS_ASSERT_EQUALS(svc.size(), 1);
     TSM_ASSERT_THROWS("Two should have been renamed to anotherOne",
-                      svc.retrieve("two"), Exception::NotFoundError);
+                      svc.retrieve("two"), const Exception::NotFoundError &);
     TSM_ASSERT_EQUALS("Two should have been renamed to anotherOne",
                       svc.retrieve("anotherOne"), two);
     // As we are renaming to an existing workspace there should be 2
@@ -197,7 +197,7 @@ public:
     svc.notificationCenter.removeObserver(observer);
     svc.notificationCenter.removeObserver(observer2);
 
-    TS_ASSERT_THROWS(svc.rename("anotherOne", ""), std::runtime_error);
+    TS_ASSERT_THROWS(svc.rename("anotherOne", ""), const std::runtime_error &);
     TSM_ASSERT_THROWS_NOTHING("'AnotherOne' should still be there",
                               svc.retrieve("anotherOne"));
   }
@@ -232,7 +232,7 @@ public:
     TS_ASSERT_EQUALS(svc.retrieve("one"), one);
     TSM_ASSERT_EQUALS("Retrieval should be case-insensitive",
                       svc.retrieve("oNE"), one);
-    TS_ASSERT_THROWS(svc.retrieve("NOTone"), Exception::NotFoundError);
+    TS_ASSERT_THROWS(svc.retrieve("NOTone"), const Exception::NotFoundError &);
 
     TS_ASSERT(svc.doesExist("one"));
     TSM_ASSERT("doesExist should be case-insensitive", svc.doesExist("oNE"));
diff --git a/Framework/Kernel/test/DateAndTimeHelpersTest.h b/Framework/Kernel/test/DateAndTimeHelpersTest.h
index 06ec77df03274f005c1a74a6a4508a47b8099684..be3174145571d1e459ee2407e683c9d0cea8bd45 100644
--- a/Framework/Kernel/test/DateAndTimeHelpersTest.h
+++ b/Framework/Kernel/test/DateAndTimeHelpersTest.h
@@ -43,7 +43,7 @@ public:
 
   void test_average() {
     std::vector<DateAndTime> times;
-    TS_ASSERT_THROWS(averageSorted(times), std::invalid_argument);
+    TS_ASSERT_THROWS(averageSorted(times), const std::invalid_argument &);
 
     times.push_back(
         createFromSanitizedISO8601("1977-05-25T00:00Z")); // Star Wars IV
diff --git a/Framework/Kernel/test/DateAndTimeTest.h b/Framework/Kernel/test/DateAndTimeTest.h
index 53b6a6993507f7597fff6a3241165fca143c148e..655b89a291f9cffbbb9d042613ea69f87708fc90 100644
--- a/Framework/Kernel/test/DateAndTimeTest.h
+++ b/Framework/Kernel/test/DateAndTimeTest.h
@@ -64,11 +64,11 @@ public:
   }
 
   void test_constructor_fails_invalid_string() {
-    TS_ASSERT_THROWS(DateAndTime("invalid time string"), std::invalid_argument);
+    TS_ASSERT_THROWS(DateAndTime("invalid time string"), const std::invalid_argument &);
     TS_ASSERT_THROWS(DateAndTime("1909-01-31  22:59:59"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(DateAndTime("2017-09-27T 07:03:49+00:00"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_limits_on_construction() {
@@ -422,7 +422,7 @@ public:
   void testNotADateTime() {
     boost::posix_time::ptime time(boost::posix_time::not_a_date_time);
     DateAndTime dt(time);
-    TS_ASSERT_THROWS(boost::posix_time::to_tm(time), std::out_of_range);
+    TS_ASSERT_THROWS(boost::posix_time::to_tm(time), const std::out_of_range &);
     TS_ASSERT_THROWS_NOTHING(dt.to_tm());
   }
 
diff --git a/Framework/Kernel/test/DiskBufferTest.h b/Framework/Kernel/test/DiskBufferTest.h
index 1636b18a105a25ec808d7abb93543a124894c45b..10a6d30ef31ad537f1f72b8b6590f789631ea9b4 100644
--- a/Framework/Kernel/test/DiskBufferTest.h
+++ b/Framework/Kernel/test/DiskBufferTest.h
@@ -511,7 +511,7 @@ public:
         freeSpaceBlocksArray + sizeof(freeSpaceBlocksArray) / sizeof(uint64_t));
 
     TS_ASSERT_THROWS(dbuf.setFreeSpaceVector(freeSpaceBlocksVector),
-                     std::length_error);
+                     const std::length_error &);
   }
 
   //// Test for setting the DiskBuffer with a zero sized vector
diff --git a/Framework/Kernel/test/DynamicFactoryTest.h b/Framework/Kernel/test/DynamicFactoryTest.h
index d9042e4bc10840bfae1b1edd6f9bc3c9e17e9ac6..2aaa564606c1ac9685142aade773973bcb28a8eb 100644
--- a/Framework/Kernel/test/DynamicFactoryTest.h
+++ b/Framework/Kernel/test/DynamicFactoryTest.h
@@ -46,7 +46,7 @@ public:
   }
 
   void testCreate() {
-    TS_ASSERT_THROWS(factory.create("testEntry"), std::runtime_error)
+    TS_ASSERT_THROWS(factory.create("testEntry"), const std::runtime_error &)
     factory.subscribe<int>("testEntry");
     TS_ASSERT_THROWS_NOTHING(int_ptr i = factory.create("testEntry"));
     TS_ASSERT_THROWS_NOTHING(int_ptr i = factory.create("TESTENTRY"));
@@ -55,11 +55,11 @@ public:
 
   void testCreateCaseSensitive() {
     TS_ASSERT_THROWS(caseSensitiveFactory.create("testEntryCaseSensitive"),
-                     std::runtime_error)
+                     const std::runtime_error &)
     caseSensitiveFactory.subscribe<int>("testEntryCaseSensitive");
     TS_ASSERT_THROWS(
         int_ptr i = caseSensitiveFactory.create("testEntryCaseSENSITIVE"),
-        std::runtime_error); // case error on a case sensitive dynamic factory
+        const std::runtime_error &); // case error on a case sensitive dynamic factory
     TS_ASSERT_THROWS_NOTHING(
         int_ptr i2 = caseSensitiveFactory.create("testEntryCaseSensitive"));
     caseSensitiveFactory.unsubscribe("testEntryCaseSensitive");
@@ -67,7 +67,7 @@ public:
 
   void testCreateUnwrapped() {
     TS_ASSERT_THROWS(factory.createUnwrapped("testUnrappedEntry"),
-                     std::runtime_error)
+                     const std::runtime_error &)
     factory.subscribe<int>("testUnwrappedEntry");
     int *i = nullptr;
     TS_ASSERT_THROWS_NOTHING(i = factory.createUnwrapped("testUnwrappedEntry"));
@@ -82,13 +82,13 @@ public:
   void testCreateUnwrappedCaseSensitive() {
     TS_ASSERT_THROWS(
         caseSensitiveFactory.create("testUnrappedEntryCaseSensitive"),
-        std::runtime_error)
+        const std::runtime_error &)
     caseSensitiveFactory.subscribe<int>("testUnrappedEntryCaseSensitive");
     int *i = nullptr;
     TS_ASSERT_THROWS(
         i = caseSensitiveFactory.createUnwrapped(
             "testUnrappedentrycaseSENSITIVE"),
-        std::runtime_error); // case error on a case sensitive dynamic factory
+        const std::runtime_error &); // case error on a case sensitive dynamic factory
     TS_ASSERT_THROWS_NOTHING(i = caseSensitiveFactory.createUnwrapped(
                                  "testUnrappedEntryCaseSensitive"));
     delete i;
@@ -96,7 +96,7 @@ public:
   }
 
   void testSubscribeWithEmptyNameThrowsInvalidArgument() {
-    TS_ASSERT_THROWS(factory.subscribe<int>(""), std::invalid_argument);
+    TS_ASSERT_THROWS(factory.subscribe<int>(""), const std::invalid_argument &);
   }
 
   void
@@ -105,7 +105,7 @@ public:
         factory.subscribe("int", new Instantiator<int, int>));
     TS_ASSERT_THROWS(factory.subscribe("int", new Instantiator<int, int>,
                                        IntFactory::ErrorIfExists),
-                     std::runtime_error);
+                     const std::runtime_error &);
     factory.unsubscribe("int");
   }
 
@@ -135,7 +135,7 @@ public:
   }
 
   void testUnsubscribeByDefaultDoesNotNotify() {
-    TS_ASSERT_THROWS(factory.unsubscribe("tester"), std::runtime_error);
+    TS_ASSERT_THROWS(factory.unsubscribe("tester"), const std::runtime_error &);
     factory.subscribe<int>("tester");
     m_updateNoticeReceived = false;
     TS_ASSERT_THROWS_NOTHING(factory.unsubscribe("tester"));
@@ -163,7 +163,7 @@ public:
   void testGetKeys() {
     std::string testKey = "testGetKeys";
     // check it is not already present
-    TS_ASSERT_THROWS(factory.create(testKey), std::runtime_error)
+    TS_ASSERT_THROWS(factory.create(testKey), const std::runtime_error &)
     factory.subscribe<int>(testKey);
 
     std::vector<std::string> keys = factory.getKeys();
@@ -180,7 +180,7 @@ public:
   void testGetKeysRetainsCase() {
     std::string testKey = "testGetKeysRetainsCase";
     // check it is not already present
-    TS_ASSERT_THROWS(factory.create(testKey), std::runtime_error)
+    TS_ASSERT_THROWS(factory.create(testKey), const std::runtime_error &)
     factory.subscribe<int>(testKey);
 
     std::vector<std::string> keys = factory.getKeys();
diff --git a/Framework/Kernel/test/FacilitiesTest.h b/Framework/Kernel/test/FacilitiesTest.h
index b6b690b2f725e5aabd4fbfe743595d821f39d393..815f823514d890f50cecd44172dd080c8da3faa9 100644
--- a/Framework/Kernel/test/FacilitiesTest.h
+++ b/Framework/Kernel/test/FacilitiesTest.h
@@ -32,7 +32,7 @@ public:
                                "  </facility>"
                                "</facilities>";
 
-    TS_ASSERT_THROWS(getFacility(xmlStr), std::runtime_error);
+    TS_ASSERT_THROWS(getFacility(xmlStr), const std::runtime_error &);
   }
 
   void test_throws_if_no_file_extensions() {
@@ -42,7 +42,7 @@ public:
                                "  </facility>"
                                "</facilities>";
 
-    TS_ASSERT_THROWS(getFacility(xmlStr), std::runtime_error);
+    TS_ASSERT_THROWS(getFacility(xmlStr), const std::runtime_error &);
   }
 
   void test_throws_if_no_instruments() {
@@ -53,7 +53,7 @@ public:
         "  </facility>"
         "</facilities>";
 
-    TS_ASSERT_THROWS(getFacility(xmlStr), std::runtime_error);
+    TS_ASSERT_THROWS(getFacility(xmlStr), const std::runtime_error &);
   }
 
   void test_minimal() {
@@ -86,7 +86,8 @@ public:
                      "AnInst");
     TS_ASSERT(fac->instruments("Nonsense").empty());
     TS_ASSERT_EQUALS(fac->instrument("AnInst").name(), "AnInst");
-    TS_ASSERT_THROWS(fac->instrument("NoInst"), Exception::NotFoundError);
+    TS_ASSERT_THROWS(fac->instrument("NoInst"),
+                     const Exception::NotFoundError &);
 
     delete fac;
   }
diff --git a/Framework/Kernel/test/FileDescriptorTest.h b/Framework/Kernel/test/FileDescriptorTest.h
index 8aa8ab0f36379f029af7bbef779e3939986657c3..374b516a408e2c60516df9f7e04eb1721a9cc949 100644
--- a/Framework/Kernel/test/FileDescriptorTest.h
+++ b/Framework/Kernel/test/FileDescriptorTest.h
@@ -140,9 +140,9 @@ public:
   //===================== Failure cases
   //============================================
   void test_IsAscii_Throws_For_Inaccessible_Filename() {
-    TS_ASSERT_THROWS(FileDescriptor::isAscii(""), std::invalid_argument);
+    TS_ASSERT_THROWS(FileDescriptor::isAscii(""), const std::invalid_argument &);
     TS_ASSERT_THROWS(FileDescriptor::isAscii("__not_a_File.txt__"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -161,12 +161,12 @@ public:
   }
 
   void test_Constructor_Throws_With_Empty_filename() {
-    TS_ASSERT_THROWS(FileDescriptor(""), std::invalid_argument);
+    TS_ASSERT_THROWS(FileDescriptor(""), const std::invalid_argument &);
   }
 
   void test_Constructor_Throws_With_NonExistant_filename() {
     TS_ASSERT_THROWS(FileDescriptor("__ThisShouldBeANonExistantFile.txt"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Kernel/test/FunctionTaskTest.h b/Framework/Kernel/test/FunctionTaskTest.h
index 879c4cd09c784b45c92cd9fab719a2e5b363ceac..e79839358098b8b6c98c79c92a76bd7f6852dfe0 100644
--- a/Framework/Kernel/test/FunctionTaskTest.h
+++ b/Framework/Kernel/test/FunctionTaskTest.h
@@ -31,7 +31,7 @@ class FunctionTaskTest : public CxxTest::TestSuite {
 public:
   void test_NullFunction_throws() {
     FunctionTask mytask(nullptr);
-    TS_ASSERT_THROWS(mytask.run(), std::runtime_error);
+    TS_ASSERT_THROWS(mytask.run(), const std::runtime_error &);
   }
 
   void test_VoidFunction() {
diff --git a/Framework/Kernel/test/IndexSetTest.h b/Framework/Kernel/test/IndexSetTest.h
index cce738306e6caecde81981fc549d221e4e9dd7a8..b81ef08e6a3f5895876be8bf6b79a6e4c0b40c3a 100644
--- a/Framework/Kernel/test/IndexSetTest.h
+++ b/Framework/Kernel/test/IndexSetTest.h
@@ -34,13 +34,13 @@ public:
 
   void test_rangeConstructorErrorCases() {
     // min negative
-    TS_ASSERT_THROWS(IndexSet set(-1, 2, 3), Exception::IndexError);
+    TS_ASSERT_THROWS(IndexSet set(-1, 2, 3), const Exception::IndexError &);
     // min > max
-    TS_ASSERT_THROWS(IndexSet set(2, 1, 3), Exception::IndexError);
+    TS_ASSERT_THROWS(IndexSet set(2, 1, 3), const Exception::IndexError &);
     // max above count
-    TS_ASSERT_THROWS(IndexSet set(1, 3, 3), Exception::IndexError);
+    TS_ASSERT_THROWS(IndexSet set(1, 3, 3), const Exception::IndexError &);
     // does it still fail if both are wrong?
-    TS_ASSERT_THROWS(IndexSet set(3, 3, 3), Exception::IndexError);
+    TS_ASSERT_THROWS(IndexSet set(3, 3, 3), const Exception::IndexError &);
   }
 
   void test_indexListConstructor() {
@@ -50,7 +50,7 @@ public:
   }
 
   void test_indexListConstructorErrorCases() {
-    TS_ASSERT_THROWS(IndexSet set({3}, 3), Exception::IndexError);
+    TS_ASSERT_THROWS(IndexSet set({3}, 3), const Exception::IndexError &);
   }
 
   void test_size() {
diff --git a/Framework/Kernel/test/InstrumentInfoTest.h b/Framework/Kernel/test/InstrumentInfoTest.h
index 1811e83dd9f1a6a1db5d51a6fcd062c4fc893d74..cd8042b7f3f0a0e7d9b821f805b1ff791405bb82 100644
--- a/Framework/Kernel/test/InstrumentInfoTest.h
+++ b/Framework/Kernel/test/InstrumentInfoTest.h
@@ -23,13 +23,13 @@ class InstrumentInfoTest : public CxxTest::TestSuite {
 public:
   void test_throws_if_unnamed_instrument() {
     TS_ASSERT_THROWS(createInstInfoInMinimalFacility("<instrument />"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_throws_if_no_techinque_given() {
     TS_ASSERT_THROWS(
         createInstInfoInMinimalFacility("<instrument name=\"inst\"/>"),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void test_mostly_default_instrument() {
@@ -187,7 +187,7 @@ public:
         "</instrument>";
 
     TS_ASSERT_THROWS(createInstInfoInMinimalFacility(instStr),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_error_1_in_multiple_zeropadding() {
@@ -198,7 +198,7 @@ public:
         "</instrument>";
 
     TS_ASSERT_THROWS(createInstInfoInMinimalFacility(instStr),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_error_2_in_multiple_zeropadding() {
@@ -209,7 +209,7 @@ public:
         "</instrument>";
 
     TS_ASSERT_THROWS(createInstInfoInMinimalFacility(instStr),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_error_3_in_multiple_zeropadding() {
@@ -220,7 +220,7 @@ public:
         "</instrument>";
 
     TS_ASSERT_THROWS(createInstInfoInMinimalFacility(instStr),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_equality_operator() {
diff --git a/Framework/Kernel/test/InterpolationTest.h b/Framework/Kernel/test/InterpolationTest.h
index 50e1e3ee2adb8be1f65468d2f30bcb2ab0e4d199..ac1a6a0419c18381c14cae688c084ba1e6b793be 100644
--- a/Framework/Kernel/test/InterpolationTest.h
+++ b/Framework/Kernel/test/InterpolationTest.h
@@ -200,15 +200,15 @@ public:
     // called.
     TS_ASSERT_THROWS(
         interpolation.findIndexOfNextLargerValue(m_tableXValues, 204.0),
-        std::range_error);
+        const std::range_error &);
 
     // outside interpolation limits - edge cases as well
     TS_ASSERT_THROWS(
         interpolation.findIndexOfNextLargerValue(m_tableXValues, 199),
-        std::range_error);
+        const std::range_error &);
     TS_ASSERT_THROWS(
         interpolation.findIndexOfNextLargerValue(m_tableXValues, 2000.0),
-        std::range_error);
+        const std::range_error &);
   }
 
   void testInterpolationWithTooFewValues() {
diff --git a/Framework/Kernel/test/ListValidatorTest.h b/Framework/Kernel/test/ListValidatorTest.h
index 3c0bca5a92a118ffc606d743a27c593548aec06a..f1da70bf90f0ac2e57db5ffca9e26dc860b2a258 100644
--- a/Framework/Kernel/test/ListValidatorTest.h
+++ b/Framework/Kernel/test/ListValidatorTest.h
@@ -99,7 +99,7 @@ public:
     TS_ASSERT_EQUALS(validator.getValueForAlias("2"), "two")
     TS_ASSERT_EQUALS(validator.getValueForAlias("3"), "three")
 
-    TS_ASSERT_THROWS(validator.getValueForAlias("4"), std::invalid_argument)
+    TS_ASSERT_THROWS(validator.getValueForAlias("4"), const std::invalid_argument &)
   }
 
   void testAliasInt() {
@@ -121,14 +121,14 @@ public:
     TS_ASSERT_EQUALS(validator.getValueForAlias("33"), "3")
     TS_ASSERT_EQUALS(validator.getValueForAlias("55"), "5")
 
-    TS_ASSERT_THROWS(validator.getValueForAlias("13"), std::invalid_argument)
+    TS_ASSERT_THROWS(validator.getValueForAlias("13"), const std::invalid_argument &)
   }
 
   void test_wrong_alias() {
     std::vector<std::string> values{"one", "three"};
     std::map<std::string, std::string> aliases{{"1", "one"}, {"2", "two"}};
     TS_ASSERT_THROWS(StringListValidator validator(values, aliases),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_self_alias() {
diff --git a/Framework/Kernel/test/LiveListenerInfoTest.h b/Framework/Kernel/test/LiveListenerInfoTest.h
index e5ea6a793fe8af56f786021fccd75ffc61d7853b..d0a86cd67f6a032e487ce97253ad37c94f593972 100644
--- a/Framework/Kernel/test/LiveListenerInfoTest.h
+++ b/Framework/Kernel/test/LiveListenerInfoTest.h
@@ -86,7 +86,7 @@ public:
     TS_ASSERT_EQUALS(info.address(), "A");
     TS_ASSERT_EQUALS(info.listener(), "L");
 
-    TS_ASSERT_THROWS(inst.liveListenerInfo("n3"), std::runtime_error);
+    TS_ASSERT_THROWS(inst.liveListenerInfo("n3"), const std::runtime_error &);
   }
 
   void test_xml_two_connections_default() {
@@ -116,7 +116,7 @@ public:
     TS_ASSERT_EQUALS(info.address(), "A");
     TS_ASSERT_EQUALS(info.listener(), "L");
 
-    TS_ASSERT_THROWS(inst.liveListenerInfo("n3"), std::runtime_error);
+    TS_ASSERT_THROWS(inst.liveListenerInfo("n3"), const std::runtime_error &);
   }
 
   void test_manual_construction() {
diff --git a/Framework/Kernel/test/LogParserTest.h b/Framework/Kernel/test/LogParserTest.h
index 055bb00cdc5cee7c29fd6a042de4afa0f575ebd2..2aa7377411bb288e21bc68777fd0ce4c20e12147 100644
--- a/Framework/Kernel/test/LogParserTest.h
+++ b/Framework/Kernel/test/LogParserTest.h
@@ -231,7 +231,7 @@ public:
     const auto &ti_dataLast = rv->first.to_tm();
     TS_ASSERT_EQUALS(ti_dataLast.tm_hour, 14);
     TS_ASSERT_EQUALS(ti_dataLast.tm_min, 3);
-    TS_ASSERT_THROWS(timeMean(p1.get()), std::runtime_error);
+    TS_ASSERT_THROWS(timeMean(p1.get()), const std::runtime_error &);
   }
 
   // Test a variant of the log file containing CHANGE_PERIOD flags
diff --git a/Framework/Kernel/test/MagneticIonTest.h b/Framework/Kernel/test/MagneticIonTest.h
index a00ffb95d75906e1108ac816f37ad8386dc8150e..9f00b27b608f126e271da17a7c36c62398812d3d 100644
--- a/Framework/Kernel/test/MagneticIonTest.h
+++ b/Framework/Kernel/test/MagneticIonTest.h
@@ -40,12 +40,12 @@ public:
   }
 
   void testErrors() {
-    TS_ASSERT_THROWS(getMagneticIon("O", 2), std::runtime_error); // no such ion
+    TS_ASSERT_THROWS(getMagneticIon("O", 2), const std::runtime_error &); // no such ion
     TS_ASSERT_THROWS(getMagneticIon("Am", 12),
-                     std::runtime_error); // no such charge
+                     const std::runtime_error &); // no such charge
     TS_ASSERT_THROWS(getJL("Am", 12),
-                     std::runtime_error); // no such charge - pass to getJL
-    TS_ASSERT_THROWS(getJL("Am", 7, 3), std::runtime_error); // no such l
+                     const std::runtime_error &); // no such charge - pass to getJL
+    TS_ASSERT_THROWS(getJL("Am", 7, 3), const std::runtime_error &); // no such l
   }
 
   void test_Copied_Object_Has_Same_Attributes() {
diff --git a/Framework/Kernel/test/MaterialBuilderTest.h b/Framework/Kernel/test/MaterialBuilderTest.h
index 6e4b0c0e9b6ba360bc86a6879142e7bd69edc8a8..ffc1ca54aa73b3b3a0855db069cbce6dcce55e0f 100644
--- a/Framework/Kernel/test/MaterialBuilderTest.h
+++ b/Framework/Kernel/test/MaterialBuilderTest.h
@@ -159,39 +159,39 @@ public:
   //----------------------------------------------------------------------------
   void test_Empty_Name_Throws_Error_When_Set() {
     MaterialBuilder builder;
-    TS_ASSERT_THROWS(builder.setName(""), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.setName(""), const std::invalid_argument &);
   }
 
   void test_Invalid_Formula_Throws_Error_When_Set() {
     MaterialBuilder builder;
-    TS_ASSERT_THROWS(builder.setFormula(""), std::invalid_argument);
-    TS_ASSERT_THROWS(builder.setFormula("Al-2"), std::invalid_argument);
+    TS_ASSERT_THROWS(builder.setFormula(""), const std::invalid_argument &);
+    TS_ASSERT_THROWS(builder.setFormula("Al-2"), const std::invalid_argument &);
   }
 
   void test_Setting_Neither_ChemicalFormula_And_AtomicNumber_Throws_Error() {
     MaterialBuilder builder;
-    TS_ASSERT_THROWS(builder.setName("Nickel").build(), std::runtime_error);
+    TS_ASSERT_THROWS(builder.setName("Nickel").build(), const std::runtime_error &);
   }
 
   void test_Setting_Both_ChemicalFormula_And_AtomicNumber_Throws_Error() {
     MaterialBuilder builder;
     TS_ASSERT_THROWS(builder.setFormula("Al2-O3").setAtomicNumber(28),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(builder.setAtomicNumber(28).setFormula("Al2-O3"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Setting_ZParameter_UnitCell_And_MassDensity_Throws_Error() {
     MaterialBuilder builder;
     TS_ASSERT_THROWS(builder.setMassDensity(4).setZParameter(6),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(builder.setMassDensity(4).setUnitCellVolume(250.),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     TS_ASSERT_THROWS(builder.setZParameter(6).setMassDensity(4),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(builder.setUnitCellVolume(6).setMassDensity(4),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_MultiAtom_with_no_number_density_throws() {
@@ -210,7 +210,7 @@ public:
                   .setCoherentXSection(0.5)
                   .setIncoherentXSection(5.0)
                   .setAbsorptionXSection(0.23);
-    TS_ASSERT_THROWS(builder.build(), std::runtime_error)
+    TS_ASSERT_THROWS(builder.build(), const std::runtime_error &)
   }
 
   void test_User_Defined_Material_Without_TotalScatterXSection_Throws() {
@@ -219,7 +219,7 @@ public:
                   .setCoherentXSection(0.5)
                   .setIncoherentXSection(5.0)
                   .setAbsorptionXSection(0.23);
-    TS_ASSERT_THROWS(builder.build(), std::runtime_error)
+    TS_ASSERT_THROWS(builder.build(), const std::runtime_error &)
   }
 
   void test_User_Defined_Material_Without_CoherentXSection_Throws() {
@@ -228,7 +228,7 @@ public:
                   .setTotalScatterXSection(2.3)
                   .setIncoherentXSection(5.0)
                   .setAbsorptionXSection(0.23);
-    TS_ASSERT_THROWS(builder.build(), std::runtime_error)
+    TS_ASSERT_THROWS(builder.build(), const std::runtime_error &)
   }
 
   void test_User_Defined_Material_Without_IncoherentXSection_Throws() {
@@ -237,7 +237,7 @@ public:
                   .setTotalScatterXSection(2.3)
                   .setCoherentXSection(5.0)
                   .setAbsorptionXSection(0.23);
-    TS_ASSERT_THROWS(builder.build(), std::runtime_error)
+    TS_ASSERT_THROWS(builder.build(), const std::runtime_error &)
   }
 
   void test_User_Defined_Material_Without_AbsorptionXSection_Throws() {
@@ -246,7 +246,7 @@ public:
                   .setTotalScatterXSection(2.3)
                   .setCoherentXSection(5.0)
                   .setIncoherentXSection(5.0);
-    TS_ASSERT_THROWS(builder.build(), std::runtime_error)
+    TS_ASSERT_THROWS(builder.build(), const std::runtime_error &)
   }
 };
 
diff --git a/Framework/Kernel/test/MaterialTest.h b/Framework/Kernel/test/MaterialTest.h
index 37f2b37488db6e9e4feeaee5099cef514dbf805d..bed1ce5732c61123ef812c6a9667013002f4f7f5 100644
--- a/Framework/Kernel/test/MaterialTest.h
+++ b/Framework/Kernel/test/MaterialTest.h
@@ -234,7 +234,7 @@ public:
     TS_ASSERT_EQUALS(cf[1].multiplicity, 1);
 
     TS_ASSERT_THROWS(cf = Material::parseChemicalFormula("H2*O"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_EQUALS(cf.size(), 2);
     TS_ASSERT_EQUALS(cf[0].atom->symbol, "H");
     TS_ASSERT_EQUALS(cf[0].atom->a_number, 0);
diff --git a/Framework/Kernel/test/MaterialXMLParserTest.h b/Framework/Kernel/test/MaterialXMLParserTest.h
index c34c98beb3020f04261ec18adf7c694f21ec9448..8ee5c314adbf557098b0af88f462dd35fce62f61 100644
--- a/Framework/Kernel/test/MaterialXMLParserTest.h
+++ b/Framework/Kernel/test/MaterialXMLParserTest.h
@@ -128,22 +128,22 @@ public:
     std::string xml;
     std::istringstream instream(xml);
     MaterialXMLParser parser;
-    TS_ASSERT_THROWS(parser.parse(instream), std::invalid_argument);
+    TS_ASSERT_THROWS(parser.parse(instream), const std::invalid_argument &);
   }
 
   void test_Missing_Or_Empty_Id_Tag_Throws_Error() {
     TS_ASSERT_THROWS(parseMaterial("<material formula=\"V\">"
                                    "</material>"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(parseMaterial("<material id=\"\" formula=\"V\">"
                                    "</material>"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Unknown_Attribute_Throws_Error() {
     TS_ASSERT_THROWS(parseMaterial("<material id=\"n\" atomic=\"28\">"
                                    "</material>"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   //----------------------------------------------------------------------------
diff --git a/Framework/Kernel/test/MatrixTest.h b/Framework/Kernel/test/MatrixTest.h
index f7d448e6c36904c54b1e3d5d026b8a730bb9e576..730b6dd0a72670ca7d87b9f0648ade8a9a02e425 100644
--- a/Framework/Kernel/test/MatrixTest.h
+++ b/Framework/Kernel/test/MatrixTest.h
@@ -183,13 +183,13 @@ public:
 
     TSM_ASSERT_THROWS("building matrix by this construcor and data with wrong "
                       "number of elements should throw",
-                      (Matrix<double>(data)), std::invalid_argument);
+                      (Matrix<double>(data)), const std::invalid_argument &);
   }
 
   void testFromVectorAndDimensions() {
     std::vector<int> data{1, 2, 3, 4, 5, 6};
     TSM_ASSERT_THROWS("building matrix with worng dimension should fail",
-                      (Matrix<int>(data, 4, 5)), std::invalid_argument);
+                      (Matrix<int>(data, 4, 5)), const std::invalid_argument &);
     Matrix<int> myMat;
     TSM_ASSERT_THROWS_NOTHING("building matrix by this construcor and data "
                               "with correct number of elements should not "
@@ -307,11 +307,11 @@ public:
     DblMatrix rot;
     std::istringstream is;
     is.str("Matr(3,3)1,2,3,4,5,6,7,8,9");
-    TS_ASSERT_THROWS(is >> rot, std::invalid_argument);
+    TS_ASSERT_THROWS(is >> rot, const std::invalid_argument &);
     is.str("Matrix3,3)1,2,3,4,5,6,7,8,9");
-    TS_ASSERT_THROWS(is >> rot, std::invalid_argument);
+    TS_ASSERT_THROWS(is >> rot, const std::invalid_argument &);
     is.str("Matrix(3,31,2,3,4,5,6,7,8,9");
-    TS_ASSERT_THROWS(is >> rot, std::invalid_argument);
+    TS_ASSERT_THROWS(is >> rot, const std::invalid_argument &);
   }
 
   void test_Input_Stream_On_Square_Matrix() {
@@ -370,7 +370,7 @@ public:
     std::istringstream is;
     is.str("Matrix(3|3)1|2,3|4|5|6|7|8|9");
     TS_ASSERT_THROWS(Mantid::Kernel::fillFromStream(is, rot, '|'),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Construction_Non_Square_Matrix_From_Output_Stream() {
@@ -451,11 +451,11 @@ public:
 
     DblMatrix M4(4, 4, true);
     TS_ASSERT_THROWS(M4.operator*(v),
-                     Mantid::Kernel::Exception::MisMatch<size_t>);
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &);
     TS_ASSERT_THROWS(M4.operator*(stdvec),
-                     Mantid::Kernel::Exception::MisMatch<size_t>);
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &);
     TS_ASSERT_THROWS(M4.multiplyPoint(stdvec, otherStdNewVec),
-                     Mantid::Kernel::Exception::MisMatch<size_t>);
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &);
 
     DblMatrix M23 = boost::lexical_cast<DblMatrix>(
         "Matrix(2,3)-0.23,0.55,5.22,2.96,4.2,0.1");
@@ -480,7 +480,7 @@ public:
     DblMatrix M43 = boost::lexical_cast<DblMatrix>(
         "Matrix(4,3)-0.23,0.55,5.22,2.96,4.2,0.1,-0.23,0.55,5.22,2.96,4.2,0.1");
     TS_ASSERT_THROWS(M43.operator*(v),
-                     Mantid::Kernel::Exception::MisMatch<size_t>); // V3D only
+                     const Mantid::Kernel::Exception::MisMatch<size_t> &); // V3D only
   }
 
   /// Test that the constructor taking preset sizes returns a zero matrix
@@ -527,9 +527,9 @@ public:
                                    7, -25, 8, 9, 42, -33, 15, 0};
     DblMatrix original(data);
     TS_ASSERT_THROWS(DblMatrix badMat(original, nRows + 1, missingCol),
-                     Mantid::Kernel::Exception::IndexError);
+                     const Mantid::Kernel::Exception::IndexError &);
     TS_ASSERT_THROWS(DblMatrix badMat(original, missingRow, nCols + 1),
-                     Mantid::Kernel::Exception::IndexError);
+                     const Mantid::Kernel::Exception::IndexError &);
     DblMatrix mat(original, missingRow, missingCol);
     checkMatrixHasExpectedValuesForSquareMatrixTest(mat);
   }
@@ -687,7 +687,8 @@ public:
     const std::vector<double> newCol{2, 5, 8};
     DblMatrix mat(data);
     size_t badCol(3), goodCol(1);
-    TS_ASSERT_THROWS(mat.setColumn(badCol, newCol), std::invalid_argument);
+    TS_ASSERT_THROWS(mat.setColumn(badCol, newCol),
+                     const std::invalid_argument &);
     mat.setColumn(goodCol, newCol);
     checkMatrixHasExpectedValuesForSquareMatrixTest(mat);
   }
@@ -697,7 +698,7 @@ public:
     const std::vector<double> newRow{7, 8, 9};
     DblMatrix mat(data);
     size_t badRow(3), goodRow(2);
-    TS_ASSERT_THROWS(mat.setRow(badRow, newRow), std::invalid_argument);
+    TS_ASSERT_THROWS(mat.setRow(badRow, newRow), const std::invalid_argument &);
     mat.setRow(goodRow, newRow);
     checkMatrixHasExpectedValuesForSquareMatrixTest(mat);
   }
@@ -761,7 +762,8 @@ public:
     const std::vector<double> dataA{1, 2, 3, 4}, dataDiag{5, 6},
         dataBad{5, 6, 7};
     DblMatrix mat(dataA);
-    TS_ASSERT_THROWS(mat.preMultiplyByDiagonal(dataBad), std::runtime_error);
+    TS_ASSERT_THROWS(mat.preMultiplyByDiagonal(dataBad),
+                     const std::runtime_error &);
     DblMatrix result = mat.preMultiplyByDiagonal(dataDiag);
     TS_ASSERT_EQUALS(result[0][0], 5);
     TS_ASSERT_EQUALS(result[0][1], 10);
@@ -773,7 +775,8 @@ public:
     const std::vector<double> dataA{1, 2, 3, 4}, dataDiag{5, 6},
         dataBad{5, 6, 7};
     DblMatrix mat(dataA);
-    TS_ASSERT_THROWS(mat.postMultiplyByDiagonal(dataBad), std::runtime_error);
+    TS_ASSERT_THROWS(mat.postMultiplyByDiagonal(dataBad),
+                     const std::runtime_error &);
     DblMatrix result = mat.postMultiplyByDiagonal(dataDiag);
     TS_ASSERT_EQUALS(result[0][0], 5);
     TS_ASSERT_EQUALS(result[0][1], 12);
diff --git a/Framework/Kernel/test/NeutronAtomTest.h b/Framework/Kernel/test/NeutronAtomTest.h
index cd69be769bc261b7f5ef98a70e9a6eb94b7751f4..d34e264bdd9c9bc18eacc105e26867c07ab2237c 100644
--- a/Framework/Kernel/test/NeutronAtomTest.h
+++ b/Framework/Kernel/test/NeutronAtomTest.h
@@ -58,8 +58,8 @@ public:
   }
 
   void testError() {
-    TS_ASSERT_THROWS(getNeutronAtom(1, 15), std::runtime_error);
-    TS_ASSERT_THROWS(getNeutronAtom(97), std::runtime_error);
+    TS_ASSERT_THROWS(getNeutronAtom(1, 15), const std::runtime_error &);
+    TS_ASSERT_THROWS(getNeutronAtom(97), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Kernel/test/NexusDescriptorTest.h b/Framework/Kernel/test/NexusDescriptorTest.h
index a6fb0553ff424bc87d900500c5eb43f6f9d53c2a..4715f36e6042e0f4551b508bd925fd343db12a5b 100644
--- a/Framework/Kernel/test/NexusDescriptorTest.h
+++ b/Framework/Kernel/test/NexusDescriptorTest.h
@@ -93,7 +93,7 @@ public:
   }
 
   void test_isHDF_Throws_With_Invalid_Filename() {
-    TS_ASSERT_THROWS(NexusDescriptor::isHDF(""), std::invalid_argument);
+    TS_ASSERT_THROWS(NexusDescriptor::isHDF(""), const std::invalid_argument &);
   }
 
   //=================================== NexusDescriptor methods
@@ -105,17 +105,17 @@ public:
   }
 
   void test_Constructor_Throws_With_Empty_filename() {
-    TS_ASSERT_THROWS(NexusDescriptor(""), std::invalid_argument);
+    TS_ASSERT_THROWS(NexusDescriptor(""), const std::invalid_argument &);
   }
 
   void test_Constructor_Throws_With_NonExistant_filename() {
     TS_ASSERT_THROWS(NexusDescriptor("__ThisShouldBeANonExistantFile.txt"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Constructor_Throws_When_Given_File_Not_Identified_As_HDF() {
     TS_ASSERT_THROWS(NexusDescriptor fd(m_testNonHDFPath),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_File_Handle_Returned_By_Data_Is_Valid() {
diff --git a/Framework/Kernel/test/OptionalBoolTest.h b/Framework/Kernel/test/OptionalBoolTest.h
index 190746330fa5e7e6fdbada7a0a1bf3ec50a67fba..ec3cfbe417ba4e5d53baaf74dcd8dcd60df933e8 100644
--- a/Framework/Kernel/test/OptionalBoolTest.h
+++ b/Framework/Kernel/test/OptionalBoolTest.h
@@ -131,10 +131,10 @@ public:
   }
 
   void testEncodeOptionalBoolPropertyThrows() {
-    using Mantid::Kernel::Exception::NotImplementedError;
     using Mantid::Kernel::OptionalBool;
+    using Mantid::Kernel::Exception::NotImplementedError;
     OptionalBool truth{OptionalBool::True};
-    TS_ASSERT_THROWS(encodeAsJson(truth), NotImplementedError);
+    TS_ASSERT_THROWS(encodeAsJson(truth), const NotImplementedError &);
   }
 };
 
diff --git a/Framework/Kernel/test/PropertyManagerDataServiceTest.h b/Framework/Kernel/test/PropertyManagerDataServiceTest.h
index fbef96affce542ba2ab0451b9ba724c6d3f30660..47becf559762e7cdc72be35ddd492ac2115903e7 100644
--- a/Framework/Kernel/test/PropertyManagerDataServiceTest.h
+++ b/Framework/Kernel/test/PropertyManagerDataServiceTest.h
@@ -30,7 +30,7 @@ public:
   void testAdd() {
     // Adding an Instrument with empty name should throw
     TS_ASSERT_THROWS(PropertyManagerDataService::Instance().add("", inst1),
-                     std::runtime_error);
+                     const std::runtime_error &);
     // This should not throw, valid name
     TS_ASSERT_THROWS_NOTHING(
         PropertyManagerDataService::Instance().add("inst1", inst1));
@@ -40,7 +40,7 @@ public:
     // AddorReplace an Instrument with empty name should throw
     TS_ASSERT_THROWS(
         PropertyManagerDataService::Instance().addOrReplace("", inst2),
-        std::runtime_error);
+        const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(
         PropertyManagerDataService::Instance().addOrReplace("inst2", inst2));
     TS_ASSERT_EQUALS(inst2.use_count(), 2);
@@ -69,7 +69,7 @@ public:
     // Should throw if the instrument can not be retrieved
     TS_ASSERT_THROWS(
         PropertyManagerDataService::Instance().retrieve("notregistered"),
-        Mantid::Kernel::Exception::NotFoundError);
+        const Mantid::Kernel::Exception::NotFoundError &);
   }
   void testRemove() {
     // Removing a non-existing data Object should give a warning in the Log but
diff --git a/Framework/Kernel/test/PropertyManagerPropertyTest.h b/Framework/Kernel/test/PropertyManagerPropertyTest.h
index 0b8d08611fa2db7224512ed670bda54980b0cc7b..077824725f05d610a8c10697d8c1f2757c2630dd 100644
--- a/Framework/Kernel/test/PropertyManagerPropertyTest.h
+++ b/Framework/Kernel/test/PropertyManagerPropertyTest.h
@@ -241,7 +241,7 @@ public:
   // Failure tests
   //----------------------------------------------------------------------------
   void test_Empty_Name_Is_Not_Accepted() {
-    TS_ASSERT_THROWS(PropertyManagerProperty(""), std::invalid_argument);
+    TS_ASSERT_THROWS(PropertyManagerProperty(""), const std::invalid_argument &);
   }
 
   void test_String_Not_Holding_Valid_Json_or_Global_PM_Name_Returns_Error() {
diff --git a/Framework/Kernel/test/PropertyManagerTest.h b/Framework/Kernel/test/PropertyManagerTest.h
index 47595e48adfd2c002d4f3ac717ffaebb5805e2ef..57c6b8ce83562a0e88a5d3cc19cac87a41e730dd 100644
--- a/Framework/Kernel/test/PropertyManagerTest.h
+++ b/Framework/Kernel/test/PropertyManagerTest.h
@@ -161,11 +161,11 @@ public:
                      std::string("9.99"));
 
     TS_ASSERT_THROWS(mgr.declareProperty(std::move(copy)),
-                     Exception::ExistsError);
+                     const Exception::ExistsError &);
     TS_ASSERT_THROWS(
         mgr.declareProperty(
             Mantid::Kernel::make_unique<PropertyWithValue<int>>("", 0)),
-        std::invalid_argument);
+        const std::invalid_argument &);
     mgr.declareProperty(
         Mantid::Kernel::make_unique<PropertyWithValue<int>>("GoodIntProp", 1),
         "Test doc");
@@ -177,8 +177,9 @@ public:
     PropertyManagerHelper mgr;
     TS_ASSERT_THROWS_NOTHING(mgr.declareProperty("myProp", 1));
     TS_ASSERT(!mgr.getPropertyValue("myProp").compare("1"));
-    TS_ASSERT_THROWS(mgr.declareProperty("MYPROP", 5), Exception::ExistsError);
-    TS_ASSERT_THROWS(mgr.declareProperty("", 5), std::invalid_argument);
+    TS_ASSERT_THROWS(mgr.declareProperty("MYPROP", 5),
+                     const Exception::ExistsError &);
+    TS_ASSERT_THROWS(mgr.declareProperty("", 5), const std::invalid_argument &);
   }
 
   void testdeclareProperty_double() {
@@ -198,8 +199,9 @@ public:
     TS_ASSERT_EQUALS(mgr.getPointerToProperty("withDoc")->documentation(),
                      "Test doc doub");
     TS_ASSERT_THROWS(mgr.declareProperty("MYPROP", 5.5),
-                     Exception::ExistsError);
-    TS_ASSERT_THROWS(mgr.declareProperty("", 5.5), std::invalid_argument);
+                     const Exception::ExistsError &);
+    TS_ASSERT_THROWS(mgr.declareProperty("", 5.5),
+                     const std::invalid_argument &);
   }
 
   void testdeclareProperty_string() {
@@ -213,8 +215,9 @@ public:
     TS_ASSERT_EQUALS(p->documentation(), "hello");
 
     TS_ASSERT_THROWS(mgr.declareProperty("MYPROP", "aValue"),
-                     Exception::ExistsError);
-    TS_ASSERT_THROWS(mgr.declareProperty("", "aValue"), std::invalid_argument);
+                     const Exception::ExistsError &);
+    TS_ASSERT_THROWS(mgr.declareProperty("", "aValue"),
+                     const std::invalid_argument &);
   }
 
   void testDeclareOrReplaceProperty() {
@@ -300,17 +303,17 @@ public:
     TS_ASSERT(!manager->getPropertyValue("aProp").compare("10"));
     manager->setPropertyValue("aProp", "1");
     TS_ASSERT_THROWS(manager->setPropertyValue("fhfjsdf", "0"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void testSetProperty() {
     TS_ASSERT_THROWS_NOTHING(manager->setProperty("AProp", 5));
     TS_ASSERT_THROWS(manager->setProperty("wefhui", 5),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
     TS_ASSERT_THROWS(manager->setProperty("APROP", 5.55),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(manager->setProperty("APROP", "value"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(manager->setProperty("AProp", 1));
   }
 
@@ -353,7 +356,7 @@ public:
   void testGetPropertyValue() {
     TS_ASSERT(!manager->getPropertyValue("APROP").compare("1"));
     TS_ASSERT_THROWS(manager->getPropertyValue("sdfshdu"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 
   void testGetProperty() {
@@ -365,13 +368,14 @@ public:
     TS_ASSERT(typeid(int) == *p->type_info());
 
     TS_ASSERT_THROWS(p = manager->getProperty("werhui"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
 
     int i(0);
     TS_ASSERT_THROWS_NOTHING(i = manager->getProperty("aprop"));
     TS_ASSERT_EQUALS(i, 1);
     double dd(0.0);
-    TS_ASSERT_THROWS(dd = manager->getProperty("aprop"), std::runtime_error);
+    TS_ASSERT_THROWS(dd = manager->getProperty("aprop"),
+                     const std::runtime_error &);
     TS_ASSERT_EQUALS(dd, 0.0); // If dd is bot used you get a compiler warning
     std::string s = manager->getProperty("aprop");
     TS_ASSERT(!s.compare("1"));
@@ -380,7 +384,7 @@ public:
     TS_ASSERT_EQUALS(d, 1.11);
     int ii(0);
     TS_ASSERT_THROWS(ii = manager->getProperty("anotherprop"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_EQUALS(ii, 0); // Compiler warning if ii is not used
     std::string ss = manager->getProperty("anotherprop");
     // Note that some versions of boost::lexical_cast > 1.34 give a string such
diff --git a/Framework/Kernel/test/PropertyTest.h b/Framework/Kernel/test/PropertyTest.h
index 8cb63837b7ec51058d6232c2d26728b89d0480b3..bfc197386348f293ae77bc60517e21eacdddd868 100644
--- a/Framework/Kernel/test/PropertyTest.h
+++ b/Framework/Kernel/test/PropertyTest.h
@@ -46,7 +46,7 @@ public:
   void testName() { TS_ASSERT(!p->name().compare("Test")); }
 
   void testEmptyNameNotPermitted() {
-    TS_ASSERT_THROWS(PropertyHelper(""), std::invalid_argument);
+    TS_ASSERT_THROWS(PropertyHelper(""), const std::invalid_argument &);
   }
 
   void testDocumentation() {
diff --git a/Framework/Kernel/test/PropertyWithValueJSONTest.h b/Framework/Kernel/test/PropertyWithValueJSONTest.h
index 381993072b518448fbcf85b386b41d4480b7defa..bd783446e9a2046d37071e431789a628b634e21a 100644
--- a/Framework/Kernel/test/PropertyWithValueJSONTest.h
+++ b/Framework/Kernel/test/PropertyWithValueJSONTest.h
@@ -140,7 +140,7 @@ public:
     Json::Value root;
     TSM_ASSERT_THROWS("Expected decode to throw for empty value",
                       decodeAsProperty("NullValue", root),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testDecodeAsPropertyEmptyArrayValueThrows() {
@@ -150,7 +150,7 @@ public:
     using Mantid::Kernel::decodeAsProperty;
     TSM_ASSERT_THROWS("Expected an empty json array to throw",
                       decodeAsProperty("EmptyArray", root),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testDecodeAsPropertyHeterogenousArrayValueThrows() {
@@ -162,7 +162,7 @@ public:
     using Mantid::Kernel::decodeAsProperty;
     TSM_ASSERT_THROWS("Expected an empty json array to throw",
                       decodeAsProperty("Mixed", mixedArray),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/Kernel/test/PropertyWithValueTest.h b/Framework/Kernel/test/PropertyWithValueTest.h
index 3205644aa57878e14bf0f8e6b4fa2b8d066f0e2a..92dfeddf0ba89cbd29f689ed7c50d4f72030e4da 100644
--- a/Framework/Kernel/test/PropertyWithValueTest.h
+++ b/Framework/Kernel/test/PropertyWithValueTest.h
@@ -680,7 +680,7 @@ public:
     std::string value = prop;
     TS_ASSERT_EQUALS(value, "Hello");
 
-    TS_ASSERT_THROWS(prop = "Mantid", std::invalid_argument);
+    TS_ASSERT_THROWS(prop = "Mantid", const std::invalid_argument &);
 
     TS_ASSERT_THROWS_NOTHING(prop = "1");
     value = prop;
diff --git a/Framework/Kernel/test/SLSQPMinimizerTest.h b/Framework/Kernel/test/SLSQPMinimizerTest.h
index 0b399c7379c78b29d367b0520ce42ab96b91eb10..1a6fc47ba6f0da6c830d3ec765c60a8fd7477355 100644
--- a/Framework/Kernel/test/SLSQPMinimizerTest.h
+++ b/Framework/Kernel/test/SLSQPMinimizerTest.h
@@ -42,11 +42,11 @@ public:
 
     ObjFunction userFunc;
     TS_ASSERT_THROWS(SLSQPMinimizer(nparams, userFunc, equality, inequality),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     equality = DblMatrix(1, nparams - 1); // cols < number parameters
     TS_ASSERT_THROWS(SLSQPMinimizer(nparams, userFunc, equality, inequality),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void
@@ -60,11 +60,11 @@ public:
 
     ObjFunction userFunc;
     TS_ASSERT_THROWS(SLSQPMinimizer(nparams, userFunc, equality, inequality),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     inequality = DblMatrix(1, nparams - 1); // cols < number parameters
     TS_ASSERT_THROWS(SLSQPMinimizer(nparams, userFunc, equality, inequality),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_minimizer_calls_user_function() {
diff --git a/Framework/Kernel/test/StatisticsTest.h b/Framework/Kernel/test/StatisticsTest.h
index 1b6721fbaf85467b1b4d804fd0e4c1db8bcd7a5f..aa1b6593572078b09f7cea473c2a0521856f2659 100644
--- a/Framework/Kernel/test/StatisticsTest.h
+++ b/Framework/Kernel/test/StatisticsTest.h
@@ -254,7 +254,7 @@ public:
     // just declare so we can have test of exception handling
     vector<double> y;
 
-    TS_ASSERT_THROWS(getMomentsAboutOrigin(x, y), std::out_of_range);
+    TS_ASSERT_THROWS(getMomentsAboutOrigin(x, y), const std::out_of_range &);
 
     // now calculate the y-values
     for (size_t i = 0; i < numX; ++i) {
diff --git a/Framework/Kernel/test/StringsTest.h b/Framework/Kernel/test/StringsTest.h
index 2910b8c5f24f214e4063adaf069d92dfaaa15107..d0bb36184f883fd26e16835670f12bb31f0fb056 100644
--- a/Framework/Kernel/test/StringsTest.h
+++ b/Framework/Kernel/test/StringsTest.h
@@ -120,7 +120,7 @@ public:
     TSM_ASSERT_EQUALS("should return empty path", 0, result.size());
     TSM_ASSERT_THROWS(" this path should go out of range",
                       split_path("/aaaa\\bbbbb/../../../", result),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
   void testSkipLine() {
     TS_ASSERT(skipLine("#blah blah"));
diff --git a/Framework/Kernel/test/ThreadPoolRunnableTest.h b/Framework/Kernel/test/ThreadPoolRunnableTest.h
index 8d78ae8807941f7f793020d3f6845ab209c22dca..6fb7f89821a5506e4cffe9e9b40200f730fed620 100644
--- a/Framework/Kernel/test/ThreadPoolRunnableTest.h
+++ b/Framework/Kernel/test/ThreadPoolRunnableTest.h
@@ -21,7 +21,7 @@ int ThreadPoolRunnableTest_value;
 class ThreadPoolRunnableTest : public CxxTest::TestSuite {
 public:
   void test_constructor() {
-    TS_ASSERT_THROWS(new ThreadPoolRunnable(0, nullptr), std::invalid_argument);
+    TS_ASSERT_THROWS(new ThreadPoolRunnable(0, nullptr), const std::invalid_argument &);
   }
 
   //=======================================================================================
diff --git a/Framework/Kernel/test/ThreadPoolTest.h b/Framework/Kernel/test/ThreadPoolTest.h
index f61d9afcbbb21bfa780c041ff0a7545e0114c4ce..d60289da1e1afb2a3e95011a6beb0ebda8272955 100644
--- a/Framework/Kernel/test/ThreadPoolTest.h
+++ b/Framework/Kernel/test/ThreadPoolTest.h
@@ -432,7 +432,7 @@ public:
       p.schedule(new TaskThatThrows());
     }
     // joinAll rethrows
-    TS_ASSERT_THROWS(p.joinAll(), std::runtime_error);
+    TS_ASSERT_THROWS(p.joinAll(), const std::runtime_error &);
     // And only one of the tasks actually ran (since we're on one core)
     TS_ASSERT_EQUALS(ThreadPoolTest_TaskThatThrows_counter, 1);
   }
diff --git a/Framework/Kernel/test/TimeSeriesPropertyTest.h b/Framework/Kernel/test/TimeSeriesPropertyTest.h
index 094e0e830d97fdad5f3d9a8a764e6c1aa2cb0dca..a3021375450829fb91e05b36785920db50529a0e 100644
--- a/Framework/Kernel/test/TimeSeriesPropertyTest.h
+++ b/Framework/Kernel/test/TimeSeriesPropertyTest.h
@@ -83,18 +83,18 @@ public:
   }
 
   void test_SetValueFromString() {
-    TS_ASSERT_THROWS(iProp->setValue("1"), Exception::NotImplementedError);
-    TS_ASSERT_THROWS(dProp->setValue("5.5"), Exception::NotImplementedError);
-    TS_ASSERT_THROWS(sProp->setValue("aValue"), Exception::NotImplementedError);
+    TS_ASSERT_THROWS(iProp->setValue("1"), const Exception::NotImplementedError &);
+    TS_ASSERT_THROWS(dProp->setValue("5.5"), const Exception::NotImplementedError &);
+    TS_ASSERT_THROWS(sProp->setValue("aValue"), const Exception::NotImplementedError &);
   }
 
   void test_SetValueFromJson() {
     TS_ASSERT_THROWS(iProp->setValueFromJson(Json::Value(1)),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
     TS_ASSERT_THROWS(dProp->setValueFromJson(Json::Value(5.5)),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
     TS_ASSERT_THROWS(sProp->setValueFromJson(Json::Value("aValue")),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
   }
 
   void test_AddValue() {
@@ -157,12 +157,12 @@ public:
     TS_ASSERT_EQUALS(derValues[2], 1);
 
     TSM_ASSERT_THROWS("derivative undefined for string property",
-                      sProp->getDerivative(), std::runtime_error);
+                      sProp->getDerivative(), const std::runtime_error &);
 
     iProp->addValue("2007-11-30T16:17:10", 10);
     TSM_ASSERT_THROWS(
         "derivative undefined for property with less then 2 values",
-        iProp->getDerivative(), std::runtime_error);
+        iProp->getDerivative(), const std::runtime_error &);
     iProp->addValue("2007-11-30T16:17:12", 12);
 
     derProp = iProp->getDerivative();
@@ -471,7 +471,7 @@ public:
 
     // Check throws if min > max
     TS_ASSERT_THROWS(log->makeFilterByValue(splitter, 2.0, 1.0, 0.0, true),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     delete log;
   }
@@ -480,7 +480,7 @@ public:
     TimeSeriesProperty<std::string> log("StringTSP");
     TimeSplitterType splitter;
     TS_ASSERT_THROWS(log.makeFilterByValue(splitter, 0.0, 0.0, 0.0, true),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
   }
 
   void test_expandFilterToRange() {
@@ -543,7 +543,7 @@ public:
 
     // Check throws if min > max
     TS_ASSERT_THROWS(log.expandFilterToRange(splitter, 2.0, 1.0, interval),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // Test good at both ends, but interval narrower than log range
     TimeInterval narrowinterval(DateAndTime("2007-11-30T16:17:15"),
@@ -562,7 +562,7 @@ public:
     TimeSplitterType splitter;
     TS_ASSERT_THROWS(
         log.expandFilterToRange(splitter, 0.0, 0.0, TimeInterval()),
-        Exception::NotImplementedError);
+        const Exception::NotImplementedError &);
   }
 
   void test_averageValueInFilter() {
@@ -643,9 +643,9 @@ public:
   void test_averageValueInFilter_throws_for_string_property() {
     TimeSplitterType splitter;
     TS_ASSERT_THROWS(sProp->averageValueInFilter(splitter),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
     TS_ASSERT_THROWS(sProp->averageAndStdDevInFilter(splitter),
-                     Exception::NotImplementedError);
+                     const Exception::NotImplementedError &);
   }
 
   //----------------------------------------------------------------------------
@@ -1154,9 +1154,9 @@ public:
     const TimeSeriesProperty<int> empty("Empty");
 
     DateAndTime time("2013-01-30T16:17:23");
-    TS_ASSERT_THROWS(empty.getSingleValue(time), std::runtime_error);
+    TS_ASSERT_THROWS(empty.getSingleValue(time), const std::runtime_error &);
     int i;
-    TS_ASSERT_THROWS(empty.getSingleValue(time, i), std::runtime_error);
+    TS_ASSERT_THROWS(empty.getSingleValue(time, i), const std::runtime_error &);
   }
 
   void test_firstLastTimeValue() {
@@ -1185,10 +1185,10 @@ public:
   void test_firstLastTimeValue_emptyPropertyThrows() {
     const TimeSeriesProperty<int> empty("Empty");
 
-    TS_ASSERT_THROWS(empty.firstTime(), std::runtime_error);
-    TS_ASSERT_THROWS(empty.lastTime(), std::runtime_error);
-    TS_ASSERT_THROWS(empty.firstValue(), std::runtime_error);
-    TS_ASSERT_THROWS(empty.lastValue(), std::runtime_error);
+    TS_ASSERT_THROWS(empty.firstTime(), const std::runtime_error &);
+    TS_ASSERT_THROWS(empty.lastTime(), const std::runtime_error &);
+    TS_ASSERT_THROWS(empty.firstValue(), const std::runtime_error &);
+    TS_ASSERT_THROWS(empty.lastValue(), const std::runtime_error &);
   }
 
   void test_min_max_value() {
@@ -1756,7 +1756,7 @@ public:
         new TimeSeriesProperty<double>("doubleProp");
 
     // 1. Test Throws
-    TS_ASSERT_THROWS(p->nthTime(1), std::runtime_error);
+    TS_ASSERT_THROWS(p->nthTime(1), const std::runtime_error &);
 
     // 2. Add entries
     TS_ASSERT_THROWS_NOTHING(p->addValue("2007-11-30T16:17:00", 1.00));
@@ -1800,7 +1800,7 @@ public:
         new TimeSeriesProperty<double>("doubleProp");
 
     // 1. Test Throws
-    TS_ASSERT_THROWS(p->nthInterval(0), std::runtime_error);
+    TS_ASSERT_THROWS(p->nthInterval(0), const std::runtime_error &);
 
     // 2. Add entries
     TS_ASSERT_THROWS_NOTHING(p->addValue("2007-11-30T16:17:00", 1.00));
diff --git a/Framework/Kernel/test/TimeSplitterTest.h b/Framework/Kernel/test/TimeSplitterTest.h
index a302b7050802f09b3a853caa9865207a48690ef9..1f7d4281d6c36fe52832cd31914d2f904cb2b114 100644
--- a/Framework/Kernel/test/TimeSplitterTest.h
+++ b/Framework/Kernel/test/TimeSplitterTest.h
@@ -143,14 +143,14 @@ public:
     stop_b = DateAndTime("2007-11-30T16:17:02");
     b = SplittingInterval(start_b, stop_b, 0);
     TS_ASSERT(!a.overlaps(b));
-    TS_ASSERT_THROWS(c = a | b;, std::invalid_argument);
+    TS_ASSERT_THROWS(c = a | b;, const std::invalid_argument &);
 
     // No overlap (a < b)
     start_b = DateAndTime("2007-11-30T16:17:30");
     stop_b = DateAndTime("2007-11-30T16:17:42");
     b = SplittingInterval(start_b, stop_b, 0);
     TS_ASSERT(!a.overlaps(b));
-    TS_ASSERT_THROWS(c = a | b;, std::invalid_argument);
+    TS_ASSERT_THROWS(c = a | b;, const std::invalid_argument &);
   }
 
   //----------------------------------------------------------------------------
@@ -474,7 +474,7 @@ public:
     TS_ASSERT_EQUALS(i.index(), 2);
 
     // This fails since you can't add splitters together
-    TS_ASSERT_THROWS(b + b, std::invalid_argument);
+    TS_ASSERT_THROWS(b + b, const std::invalid_argument &);
   }
 
   //----------------------------------------------------------------------------
diff --git a/Framework/Kernel/test/UnitConversionTest.h b/Framework/Kernel/test/UnitConversionTest.h
index eb050b19e797941e5500e601ecb6bb183976b6eb..812100fd57d429af5e2175c69a5a5b36e0e1f7aa 100644
--- a/Framework/Kernel/test/UnitConversionTest.h
+++ b/Framework/Kernel/test/UnitConversionTest.h
@@ -26,7 +26,7 @@ public:
     using Mantid::Kernel::DeltaEMode;
     TS_ASSERT_THROWS(UnitConversion::run("zxzxz", "Wavelength", 0.0, 0.0, 0.0,
                                          0.0, DeltaEMode::Elastic, 0.0),
-                     NotFoundError);
+                     const NotFoundError &);
   }
 
   void test_Run_Throws_When_Dest_Unit_Is_Unknown() {
@@ -34,7 +34,7 @@ public:
     using Mantid::Kernel::DeltaEMode;
     TS_ASSERT_THROWS(UnitConversion::run("Wavelength", "xszfsdf", 0.0, 0.0, 0.0,
                                          0.0, DeltaEMode::Elastic, 0.0),
-                     NotFoundError);
+                     const NotFoundError &);
   }
 
   void
diff --git a/Framework/Kernel/test/UnitFactoryTest.h b/Framework/Kernel/test/UnitFactoryTest.h
index 75814f58241695e80137ba88dd5d72331b69267d..3e2838c9f3ebf8ae71b2391f5b025065d0ef8e97 100644
--- a/Framework/Kernel/test/UnitFactoryTest.h
+++ b/Framework/Kernel/test/UnitFactoryTest.h
@@ -27,7 +27,7 @@ public:
 
   void test_Create_With_Unknown_Unit_Throws_Exception() {
     TS_ASSERT_THROWS(UnitFactory::Instance().create("_NOT_A_REAL_UNIT"),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
   }
 };
 
diff --git a/Framework/Kernel/test/UnitTest.h b/Framework/Kernel/test/UnitTest.h
index 14ec629a60f6d938306f100908a1cb8defc409f4..3b274421ded7cb85b8f9b4a57782a1c02b71bb2b 100644
--- a/Framework/Kernel/test/UnitTest.h
+++ b/Framework/Kernel/test/UnitTest.h
@@ -850,7 +850,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dE.toTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
 
   void testDeltaE_fromTOF() {
@@ -867,7 +867,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dE.fromTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
   void testDERange() {
     std::vector<double> sample, rezult;
@@ -948,7 +948,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dEk.toTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
 
   void testDeltaEk_fromTOF() {
@@ -965,7 +965,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dEk.fromTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
   void testDE_kRange() {
     std::vector<double> sample, rezult;
@@ -1046,7 +1046,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dEf.toTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
 
   void testDeltaEf_fromTOF() {
@@ -1063,7 +1063,7 @@ public:
 
     // emode = 0
     TS_ASSERT_THROWS(dEf.fromTOF(x, y, 1.5, 2.5, 0.0, 0, 4.0, 0.0),
-                     std::invalid_argument)
+                     const std::invalid_argument &)
   }
 
   void testDE_fRange() {
@@ -1407,11 +1407,11 @@ public:
   }
 
   void test_that_singleToTOF_throws_for_the_Degrees_unit() {
-    TS_ASSERT_THROWS(degrees.singleToTOF(1.0), std::runtime_error);
+    TS_ASSERT_THROWS(degrees.singleToTOF(1.0), const std::runtime_error &);
   }
 
   void test_that_singleFromTOF_throws_for_the_Degrees_unit() {
-    TS_ASSERT_THROWS(degrees.singleFromTOF(1.0), std::runtime_error);
+    TS_ASSERT_THROWS(degrees.singleFromTOF(1.0), const std::runtime_error &);
   }
 
   //----------------------------------------------------------------------
@@ -1433,11 +1433,12 @@ public:
   }
 
   void test_that_singleToTOF_throws_for_the_TemperatureKelvin_unit() {
-    TS_ASSERT_THROWS(temperature.singleToTOF(1.0), std::runtime_error);
+    TS_ASSERT_THROWS(temperature.singleToTOF(1.0), const std::runtime_error &);
   }
 
   void test_that_singleFromTOF_throws_for_the_TemperatureKelvin_unit() {
-    TS_ASSERT_THROWS(temperature.singleFromTOF(1.0), std::runtime_error);
+    TS_ASSERT_THROWS(temperature.singleFromTOF(1.0),
+                     const std::runtime_error &);
   }
 
   //----------------------------------------------------------------------
diff --git a/Framework/Kernel/test/V3DTest.h b/Framework/Kernel/test/V3DTest.h
index f5b6bfd8fb943ffadc37863f612a52c03cfbf304..f9fedd509bfc8ae560b85a63ec3106441bcbb5af 100644
--- a/Framework/Kernel/test/V3DTest.h
+++ b/Framework/Kernel/test/V3DTest.h
@@ -468,7 +468,7 @@ public:
 
   void test_toCrystllographic() {
     V3D a0;
-    TS_ASSERT_THROWS(a0.toMillerIndexes(), std::invalid_argument);
+    TS_ASSERT_THROWS(a0.toMillerIndexes(), const std::invalid_argument &);
 
     V3D a1(0.1, 0.2, 5);
     TS_ASSERT_THROWS_NOTHING(a1.toMillerIndexes());
diff --git a/Framework/Kernel/test/VectorHelperTest.h b/Framework/Kernel/test/VectorHelperTest.h
index dfa6af9609cde9e5f4a2f729f44406f30a41396c..ee3c39239e297bcf8116d3e6c46b9b3a9c4a6d7e 100644
--- a/Framework/Kernel/test/VectorHelperTest.h
+++ b/Framework/Kernel/test/VectorHelperTest.h
@@ -170,21 +170,21 @@ public:
     const std::vector<double> rbParams = {1.0};
     std::vector<double> axis;
     TS_ASSERT_THROWS(VectorHelper::createAxisFromRebinParams(rbParams, axis),
-                     const std::runtime_error)
+                     const std::runtime_error &)
   }
 
   void test_createAxisFromRebinParams_throwsOnInfiniteVal() {
     const std::vector<double> params = {1.0, INFINITY};
     std::vector<double> axis;
     TS_ASSERT_THROWS(VectorHelper::createAxisFromRebinParams(params, axis),
-                     const std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_createAxisFromRebinParams_throwsOnNaNVal() {
     const std::vector<double> params = {1.0, NAN};
     std::vector<double> axis;
     TS_ASSERT_THROWS(VectorHelper::createAxisFromRebinParams(params, axis),
-                     const std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_CreateAxisFromRebinParams_xMinXMaxHints() {
@@ -331,19 +331,6 @@ public:
     TS_ASSERT_EQUALS(y.size(), 2);
   }
 
-  // TODO: Figure out proper behavior if given stupidity as inputs
-  //  void test_splitStringIntoVector_badNumber_gives0()
-  //  {
-  //    std::vector<int> vec;
-  //    vec = VectorHelper::splitStringIntoVector<int>("2, monkey, potato,
-  //    134");
-  //    TS_ASSERT_EQUALS( vec.size(), 4);
-  //    TS_ASSERT_EQUALS( vec[0], 2);
-  //    TS_ASSERT_EQUALS( vec[1], 0);
-  //    TS_ASSERT_EQUALS( vec[2], 0);
-  //    TS_ASSERT_EQUALS( vec[3], 134);
-  //  }
-
   void test_getBinIndex_Returns_Zero_For_Value_Lower_Than_Input_Range() {
     const double testValue = m_test_bins.front() - 1.1;
     int index(-1);
@@ -410,7 +397,7 @@ public:
     std::vector<double> output;
     TS_ASSERT_THROWS(
         VectorHelper::smoothInRange(inputData, output, 6, &inputBoundaries),
-        std::invalid_argument);
+        const std::invalid_argument &);
     inputBoundaries.push_back(6);
     VectorHelper::smoothInRange(inputData, output, 6, &inputBoundaries);
 
diff --git a/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp b/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp
index aaa352571e98d3e22a145e76dcb2a4b3613cedbf..a1c3674a36dd3030c22355cf55814abe6aec8c4d 100644
--- a/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp
+++ b/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp
@@ -290,8 +290,9 @@ static int isisds_recv_command_helper(SOCKET s, char **command, void **data,
     return -1;
   }
   *command = reinterpret_cast<char *>(malloc(sizeof(comm.command) + 1));
-  strncpy(*command, comm.command, sizeof(comm.command));
-  (*command)[sizeof(comm.command)] = '\0';
+  const auto commCommandSize = sizeof(comm.command);
+  strncpy(*command, comm.command, commCommandSize);
+  (*command)[commCommandSize] = '\0';
   len_data = comm.len - sizeof(comm); /* in bytes */
   if (len_data < 0) {
     return -1; /* error */
diff --git a/Framework/LiveData/test/FileEventDataListenerTest.h b/Framework/LiveData/test/FileEventDataListenerTest.h
index 811202bd6ce7460e65265198349911f0308a378a..1499b59d57a286522790a2315da2818d1596d39e 100644
--- a/Framework/LiveData/test/FileEventDataListenerTest.h
+++ b/Framework/LiveData/test/FileEventDataListenerTest.h
@@ -75,7 +75,7 @@ public:
     TS_ASSERT_EQUALS(listener->runStatus(), ILiveListener::EndRun)
 
     // Calling it again will throw as it's the end of the file
-    TS_ASSERT_THROWS(listener->extractData(), std::runtime_error)
+    TS_ASSERT_THROWS(listener->extractData(), const std::runtime_error &)
   }
 };
 
diff --git a/Framework/LiveData/test/ISISHistoDataListenerTest.h b/Framework/LiveData/test/ISISHistoDataListenerTest.h
index a48de9c566ba39126758206126fc4d33a2c64898..677f550310a695204f04d70888b123c20837e31f 100644
--- a/Framework/LiveData/test/ISISHistoDataListenerTest.h
+++ b/Framework/LiveData/test/ISISHistoDataListenerTest.h
@@ -387,7 +387,7 @@ public:
       return;
 
     TS_ASSERT_THROWS(auto outWS = listener->extractData(),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     dae.cancel();
     res.wait();
@@ -417,7 +417,7 @@ public:
     TS_ASSERT_THROWS(auto listener =
                          Mantid::API::LiveListenerFactory::Instance().create(
                              "TESTHISTOLISTENER", true, &alg),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     dae.cancel();
     res.wait();
diff --git a/Framework/LiveData/test/KafkaEventStreamDecoderTest.h b/Framework/LiveData/test/KafkaEventStreamDecoderTest.h
index 45a51fc6c9f14ada4c84369e0d45f07d9870c6c8..318a7b2a30f378e03210a4d0fb950a359c6eeb26 100644
--- a/Framework/LiveData/test/KafkaEventStreamDecoderTest.h
+++ b/Framework/LiveData/test/KafkaEventStreamDecoderTest.h
@@ -375,7 +375,7 @@ public:
     auto decoder = createTestDecoder(mockBroker);
     startCapturing(*decoder, 1);
 
-    TS_ASSERT_THROWS(decoder->extractData(), std::runtime_error);
+    TS_ASSERT_THROWS(decoder->extractData(), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(decoder->stopCapture());
     TS_ASSERT(!decoder->isCapturing());
   }
@@ -393,7 +393,7 @@ public:
     auto decoder = createTestDecoder(mockBroker);
     startCapturing(*decoder, 1);
 
-    TS_ASSERT_THROWS(decoder->extractData(), std::runtime_error);
+    TS_ASSERT_THROWS(decoder->extractData(), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(decoder->stopCapture());
     TS_ASSERT(!decoder->isCapturing());
   }
@@ -410,7 +410,7 @@ public:
         .WillOnce(Return(new FakeISISSpDetStreamSubscriber));
     auto decoder = createTestDecoder(mockBroker);
     startCapturing(*decoder, 1);
-    TS_ASSERT_THROWS(decoder->extractData(), std::runtime_error);
+    TS_ASSERT_THROWS(decoder->extractData(), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(decoder->stopCapture());
     TS_ASSERT(!decoder->isCapturing());
   }
diff --git a/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h b/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h
index 28878a1be2e866088a4e92e7ac297fb5dd52bb38..a01529ce9b07ac8a675212c1f38534d8e6aafa6f 100644
--- a/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h
+++ b/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h
@@ -50,24 +50,24 @@ public:
   void test_trying_to_construct_object_with_unknown_id_throws_exception() {
     // createEmptyExptInfo();
     auto expt = boost::make_shared<Mantid::API::ExperimentInfo>();
-    TS_ASSERT_THROWS(CachedExperimentInfo(*expt, 1000), std::out_of_range);
+    TS_ASSERT_THROWS(CachedExperimentInfo(*expt, 1000), const std::out_of_range &);
   }
 
   void test_trying_to_construct_object_with_no_chopper_throws() {
     TS_ASSERT_THROWS(createTestCachedExperimentInfo(NoChopper),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_trying_to_construct_object_with_no_aperature_throws() {
     TS_ASSERT_THROWS(createTestCachedExperimentInfo(WithChopper, NoAperture),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_trying_to_construct_object_with_no_det_shape_throws() {
     TS_ASSERT_THROWS(createTestCachedExperimentInfo(WithChopper, WithAperture,
                                                     DeltaEMode::Direct,
                                                     V3D(1, 1, 1), NoDetShape),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_efixed_returns_Ei_for_direct_mode() {
diff --git a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h
index 7ca6dba8afca9809fee552f990009dc8eca3f4d6..6cfd159b633863cce2e33264f5c967de638a26ec 100644
--- a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h
+++ b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h
@@ -41,7 +41,7 @@ public:
     TSM_ASSERT_THROWS("Should have thrown invalid_argument exception as "
                       "Function element was expected, but not found.",
                       functionParser.createFunctionBuilder(pRootElem),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void disabled_testNoSuccessorFunctionParserThrows(void) {
@@ -58,7 +58,7 @@ public:
     CompositeImplicitFunctionParser functionParser;
     TSM_ASSERT_THROWS(
         "There is no successor parser setup for the PlaneFunctionParser",
-        functionParser.createFunctionBuilder(pRootElem), std::runtime_error);
+        functionParser.createFunctionBuilder(pRootElem), const std::runtime_error &);
   }
 
   void disabled_testCallsFunctionParserChain() {
diff --git a/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h b/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h
index 28f0c8ca45cf166ce8e0d725de76d2a963349e97..6643bb0897d43f82d634b3ea2a47d5c92f871d02 100644
--- a/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h
+++ b/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h
@@ -109,7 +109,7 @@ public:
                           "_2"); // Not really required for child algorithm
 
     if (nonIntegr.size() > 2 || nonIntegr.empty()) {
-      TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+      TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     } else {
       try {
         alg->execute();
diff --git a/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h b/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h
index 1df1489c61761b6f39ecfd6ce1a740a7b7d770e7..f1a9de9bc478c055d3badc0789a138bd6b182076 100644
--- a/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h
+++ b/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h
@@ -129,7 +129,7 @@ public:
     // Ei is not defined
     TSM_ASSERT_THROWS("WS has to have input energy for indirect methods",
                       pAlg->preprocessDetectorsPositions(ws2DNew),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
     ws2DNew->mutableRun().addProperty("Ei", 130., "meV", true);
 
     auto TableWS6 = pAlg->preprocessDetectorsPositions(ws2DNew);
@@ -143,7 +143,7 @@ public:
     TSM_ASSERT_THROWS("WS has to have input energy for indirect methods "
                       "despite the table workspace is already calculated",
                       pAlg->preprocessDetectorsPositions(ws2DNew),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
   void testUpdateMasksSkipped() {
     Mantid::API::MatrixWorkspace_sptr ws2Dp =
diff --git a/Framework/MDAlgorithms/test/ConvertToMDTest.h b/Framework/MDAlgorithms/test/ConvertToMDTest.h
index 2c10105717553778971dbd6eb08013457d7bc6f4..10636c66cebf7d162b2b70e306ce44644549c09e 100644
--- a/Framework/MDAlgorithms/test/ConvertToMDTest.h
+++ b/Framework/MDAlgorithms/test/ConvertToMDTest.h
@@ -109,7 +109,7 @@ public:
         pAlg->setPropertyValue("OutputWorkspace", "EnergyTransferND"));
     // unknown Q-dimension trows
     TS_ASSERT_THROWS(pAlg->setPropertyValue("QDimensions", "unknownQ"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // correct Q-dimension fine
     TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("QDimensions", "|Q|"));
     // additional dimensions requested -- fine
diff --git a/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h b/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h
index 13ea362fd013982ab4b37c66da1d2a1ecfcf0f1d..9eb77a4f6a45dd84c7353e128131e6975af9c820 100644
--- a/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h
+++ b/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h
@@ -52,7 +52,7 @@ public:
 
     TSM_ASSERT_THROWS(" the workspace X axis does not have units ",
                       pAlg->setPropertyValue("InputWorkspace", ws2D->getName()),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(
         pAlg->setPropertyValue("OutputWorkspace", "EnergyTransfer4DWS"));
   }
diff --git a/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h b/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h
index 103d150cba165d95f63e78f438d658ed69b41ebd..a63363583edb446d1ee0e7224728a8e617cb183e 100644
--- a/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h
+++ b/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h
@@ -99,7 +99,7 @@ public:
     alg->setProperty("OverrideIncidentTheta", true);
     alg->setProperty("IncidentTheta", -0.0001);
     TSM_ASSERT_THROWS("Incident theta is negative, should throw",
-                      alg->execute(), std::logic_error);
+                      alg->execute(), const std::logic_error &);
   }
 
   void test_theta_initial_too_large_throws() {
@@ -107,26 +107,26 @@ public:
     alg->setProperty("OverrideIncidentTheta", true);
     alg->setProperty("IncidentTheta", 90.001);
     TSM_ASSERT_THROWS("Incident theta is too large, should throw",
-                      alg->execute(), std::logic_error);
+                      alg->execute(), const std::logic_error &);
   }
 
   void test_wrong_number_of_extents_throws() {
     auto alg = make_standard_algorithm();
     alg->setProperty("Extents", "-1");
     TSM_ASSERT_THROWS("Should only accept 4 extents", alg->execute(),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   void test_extents_with_qxmin_equals_qxmax_throws() {
     auto alg = make_standard_algorithm();
     alg->setProperty("Extents", "-1,-1,-1,1");
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_extents_with_qxmin_more_than_qxmax_throws() {
     auto alg = make_standard_algorithm();
     alg->setProperty("Extents", "-1,-1.01,-1,1");
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_extents_with_qxmin_less_than_qxmax() {
@@ -138,13 +138,13 @@ public:
   void test_extents_with_qzmin_equals_qzmax_throws() {
     auto alg = make_standard_algorithm();
     alg->setProperty("Extents", "-1,1,-1,-1");
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_extents_with_qzmin_more_than_qzmax_throws() {
     auto alg = make_standard_algorithm();
     alg->setProperty("Extents", "-1,1,-1,-1.01");
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_extents_with_qzmin_less_than_qzmax() {
diff --git a/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h
index fe99492472c137dd901deead7c30ec3ff1b2d032..18bc860ab5b7cc3ea4b0c6a699e04892ac2f736c 100644
--- a/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h
+++ b/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h
@@ -67,7 +67,7 @@ public:
     alg->setProperty(
         "SignalInput",
         "1"); // Only one signal value provided, but NumberOfBins set to 5!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     AnalysisDataService::Instance().remove(outWSName);
   }
 
@@ -77,7 +77,7 @@ public:
     alg->setProperty(
         "ErrorInput",
         "1"); // Only one error value provided, but NumberOfBins set to 5!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     AnalysisDataService::Instance().remove(outWSName);
   }
 
@@ -87,7 +87,7 @@ public:
     alg->setProperty("NumberOfEvents", "1"); // Only one number of events value
                                              // provided, but NumberOfBins set
                                              // to 5!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
     AnalysisDataService::Instance().remove(outWSName);
   }
 
diff --git a/Framework/MDAlgorithms/test/CreateMDTest.h b/Framework/MDAlgorithms/test/CreateMDTest.h
index 3b895b7a8632d2d251622171c7b12bc41b529499..cc3b027d014292f4848e3a21a729df4ebf9f171f 100644
--- a/Framework/MDAlgorithms/test/CreateMDTest.h
+++ b/Framework/MDAlgorithms/test/CreateMDTest.h
@@ -63,7 +63,7 @@ public:
     alg.setRethrows(true);
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT_THROWS(alg.setPropertyValue("DataSources", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_psi_right_size() {
@@ -85,7 +85,7 @@ public:
     alg.setPropertyValue("Gl", "0");      // Right size
     alg.setPropertyValue("Gs", "0");      // Right size
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
 
     // Clean up
     Mantid::API::AnalysisDataService::Instance().remove(
@@ -111,7 +111,7 @@ public:
     alg.setPropertyValue("Gl", "0,0"); // Too large
     alg.setPropertyValue("Gs", "0");   // Right size
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
 
     // Clean up
     Mantid::API::AnalysisDataService::Instance().remove(
@@ -137,7 +137,7 @@ public:
     alg.setPropertyValue("Gl", "0");   // Right size
     alg.setPropertyValue("Gs", "0,0"); // Too large
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
 
     // Clean up
     Mantid::API::AnalysisDataService::Instance().remove(
diff --git a/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h b/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h
index f21a9c10bfa3f4c7b25b41e00ea336ee664201ca..cf9534a5e7b79b9610933583de05a9c279e3f77a 100644
--- a/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h
+++ b/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h
@@ -72,7 +72,7 @@ public:
                          "simple_md", "Dimensions", "3", "Extents",
                          "-1,1,-2,2,3,3", "Names", "One,Two,Three", "Units",
                          "One,Two,Three", "Frames", "QSample, QTest, QSample"),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     // Wrong number of frames
     TS_ASSERT_THROWS(!FrameworkManager::Instance().exec(
@@ -80,7 +80,7 @@ public:
                          "simple_md", "Dimensions", "3", "Extents",
                          "-1,1,-2,2,3,3", "Names", "One,Two,Three", "Units",
                          "One,Two,Three", "Frames", "QSample, QSample"),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     // Uses too much memory
     TS_ASSERT(!FrameworkManager::Instance()
diff --git a/Framework/MDAlgorithms/test/CutMDTest.h b/Framework/MDAlgorithms/test/CutMDTest.h
index dab00176b9494f3dd04e3ff4b92bf0f93e8c750c..10d8f150e925be56045b0e3192211f399e131895 100644
--- a/Framework/MDAlgorithms/test/CutMDTest.h
+++ b/Framework/MDAlgorithms/test/CutMDTest.h
@@ -174,7 +174,7 @@ public:
     algCutMD->setProperty("P2Bin", "0.1");
     algCutMD->setProperty("P3Bin", "0.1");
     algCutMD->setProperty("P4Bin", "0.1");
-    TS_ASSERT_THROWS(algCutMD->execute(), std::runtime_error)
+    TS_ASSERT_THROWS(algCutMD->execute(), const std::runtime_error &)
 
     AnalysisDataService::Instance().remove(wsName);
   }
diff --git a/Framework/MDAlgorithms/test/FindPeaksMDTest.h b/Framework/MDAlgorithms/test/FindPeaksMDTest.h
index 313d7b3c03a1f41b2596c1b337c79a5e6f9eccab..4c338361125b00236ebad1ac6b8a9d61d04a7930 100644
--- a/Framework/MDAlgorithms/test/FindPeaksMDTest.h
+++ b/Framework/MDAlgorithms/test/FindPeaksMDTest.h
@@ -244,7 +244,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setProperty("PeakFindingStrategy", "NumberOfEventsNormalization"));
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("SignalThresholdFactor", 1.3));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
 
     AnalysisDataService::Instance().remove("MDEWS");
   }
diff --git a/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h b/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h
index ede2dc3a7b050506cfff5edefdf42a206e01e409..9041bffcfb9cc93d944259cf0486e0ff8ec9f945 100644
--- a/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h
+++ b/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h
@@ -43,7 +43,7 @@ public:
                                                               testMatrixWS);
 
     TS_ASSERT_THROWS(alg->setPropertyValue("InputWorkspace", m_inputName),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     Mantid::API::AnalysisDataService::Instance().remove(m_inputName);
   }
diff --git a/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h b/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h
index 5db87887b6c66be9c594ca82d5df0bbfed5f2d26..d6bd8968648f26d03ca4cf641a9b3e60efd7ac66 100644
--- a/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h
+++ b/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h
@@ -117,7 +117,7 @@ private:
     alg.setRethrows(true);
     alg.setPropertyValue("Filename", infile.getFileName());
     alg.setPropertyValue("OutputWorkspace", "test_out");
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
 public:
diff --git a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h
index ddd5e7dcd5e9b766bd82b3bea9d0ba53289d4b0f..40b9a26b6a059ed0482c1b668068da3abde9f995 100644
--- a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h
+++ b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h
@@ -108,7 +108,7 @@ public:
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     TS_ASSERT_THROWS(alg->setProperty("Dimensionality", 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_throws_if_dimensionality_greater_than_nine() {
@@ -116,7 +116,7 @@ public:
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     TS_ASSERT_THROWS(alg->setProperty("Dimensionality", 10),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_set_dimensionality() {
@@ -130,7 +130,7 @@ public:
     MDFileObject fileObject("test_file_for_load_md_histo_workspace_test_.txt",
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
-    TS_ASSERT_THROWS(alg->setProperty("Filename", ""), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->setProperty("Filename", ""), const std::invalid_argument &);
   }
 
   void test_throws_with_non_existant_filename() {
@@ -138,7 +138,7 @@ public:
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     TS_ASSERT_THROWS(alg->setProperty("Filename", "does_not_exist.txt"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_throws_when_wrong_number_of_extent_entries() {
@@ -147,7 +147,7 @@ public:
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     alg->setPropertyValue("Extents",
                           "1,-1"); // Extents only provided for 1Dimension!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_when_wrong_number_of_name_entries() {
@@ -155,7 +155,7 @@ public:
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     alg->setPropertyValue("Names", "A"); // Names only provided for 1Dimension!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_when_wrong_number_of_unit_entries() {
@@ -163,7 +163,7 @@ public:
                             2 * 2);
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     alg->setPropertyValue("Units", "U1"); // Units only provided for 1Dimension!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_when_wrong_number_of_bin_entries() {
@@ -172,7 +172,7 @@ public:
     IAlgorithm_sptr alg = make_standard_algorithm(fileObject);
     alg->setPropertyValue("Names",
                           "2"); // bin numbers only provided for 1Dimension!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_when_more_bins_expected_than_entries_in_file() {
@@ -188,7 +188,7 @@ public:
     alg->setPropertyValue("Units", "U1,U2,U3");
     alg->setProperty("Dimensionality",
                      3); // but dimensionality has been set to 3 also!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_when_less_bins_expected_than_entries_in_file() {
@@ -206,7 +206,7 @@ public:
     alg->setPropertyValue("Units", "U1,U2,U3");
     alg->setProperty("Dimensionality",
                      3); // but dimensionality has been set to 3 also!
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   /// Test execution with as specific output dimensionality required.
diff --git a/Framework/MDAlgorithms/test/IntegrateFluxTest.h b/Framework/MDAlgorithms/test/IntegrateFluxTest.h
index bcb99bf2f88b62d0e2795cd89a570c3c7bc12b03..9e19580a86d27f637bfa83fc947918a3b562f140 100644
--- a/Framework/MDAlgorithms/test/IntegrateFluxTest.h
+++ b/Framework/MDAlgorithms/test/IntegrateFluxTest.h
@@ -239,7 +239,7 @@ private:
     alg.initialize();
     alg.setPropertyValue("InputWorkspace", inWSName);
     alg.setPropertyValue("OutputWorkspace", outWSName);
-    TS_ASSERT_THROWS(alg.setProperty("NPoints", 1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.setProperty("NPoints", 1), const std::invalid_argument &);
 
     // Remove workspace from the data service.
     AnalysisDataService::Instance().clear();
diff --git a/Framework/MDAlgorithms/test/InvalidParameterTest.h b/Framework/MDAlgorithms/test/InvalidParameterTest.h
index c2263f315c7172ba223eb59a3d6001a72b4a4a99..5e1689ff37acf8d2c105e3fd00ace9f9aa221812 100644
--- a/Framework/MDAlgorithms/test/InvalidParameterTest.h
+++ b/Framework/MDAlgorithms/test/InvalidParameterTest.h
@@ -50,7 +50,7 @@ public:
     InvalidParameter invalidParam;
     TSM_ASSERT_THROWS("Should have thrown runtime_error exception as it is not "
                       "possible to represent and invalid parameter in xml.",
-                      invalidParam.toXMLString(), std::runtime_error);
+                      invalidParam.toXMLString(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/MDAlgorithms/test/LoadDNSSCDTest.h b/Framework/MDAlgorithms/test/LoadDNSSCDTest.h
index ca0ab99ca91040a9440c26f01b6e1827990e4099..19d64a5c38d0c7d4b47124e76e7a6af1953d4632 100644
--- a/Framework/MDAlgorithms/test/LoadDNSSCDTest.h
+++ b/Framework/MDAlgorithms/test/LoadDNSSCDTest.h
@@ -817,7 +817,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("Normalization", "monitor"));
 
     // algorithm should throw if no valid files is provided
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/MDAlgorithms/test/LoadSQW2Test.h b/Framework/MDAlgorithms/test/LoadSQW2Test.h
index 595910611c8ad5781a2ae9fc1b3d20db2d32443e..0c3ce425fee2d1f1439f4e921ff96335cc8ae28b 100644
--- a/Framework/MDAlgorithms/test/LoadSQW2Test.h
+++ b/Framework/MDAlgorithms/test/LoadSQW2Test.h
@@ -125,20 +125,20 @@ public:
   void test_Filename_Property_Throws_If_Not_Found() {
     auto alg = createAlgorithm();
     TS_ASSERT_THROWS(alg->setPropertyValue("Filename", "x.sqw"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Unknown_Q3DFrame_Is_Not_Accepted() {
     auto alg = createAlgorithm();
     TS_ASSERT_THROWS(alg->setPropertyValue("Q3DFrames", "Unknown"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_Unsupported_SQW_Type_Throws_Error() {
     auto algm = createAlgorithm();
     algm->setProperty("Filename", "horace_dnd_test_file.sqw");
     algm->setRethrows(true);
-    TS_ASSERT_THROWS(algm->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(algm->execute(), const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/MDAlgorithms/test/LoadSQWTest.h b/Framework/MDAlgorithms/test/LoadSQWTest.h
index f3e46b62eae283e1397ef25ecad419fa80378588..dda6c0064ebb711e948938f06e0843fb00e5338c 100644
--- a/Framework/MDAlgorithms/test/LoadSQWTest.h
+++ b/Framework/MDAlgorithms/test/LoadSQWTest.h
@@ -135,7 +135,7 @@ public:
     LoadSQW alg;
     alg.initialize();
     TS_ASSERT_THROWS(alg.setPropertyValue("Filename", "x.sqw"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testAddDimensions() {
diff --git a/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h b/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h
index 65002ccb1bc93cd055dfb62c7e9de67de463b989..6f8ee0c6f35621623c1cb8b0c03fc65c0e1452d8 100644
--- a/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h
+++ b/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h
@@ -41,12 +41,12 @@ public:
 
     TSM_ASSERT_THROWS("too few dimensions",
                       pws = pWSWrap->createEmptyMDWS(TWS0),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
     TSM_ASSERT_THROWS("too many dimensions",
                       pws = pWSWrap->createEmptyMDWS(TWS10),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
     TSM_ASSERT_THROWS("dimensions have not been defined ",
-                      pWSWrap->nDimensions(), std::invalid_argument);
+                      pWSWrap->nDimensions(), const std::invalid_argument &);
 
     TSM_ASSERT_THROWS_NOTHING("should be fine",
                               pws = pWSWrap->createEmptyMDWS(TWS5));
diff --git a/Framework/MDAlgorithms/test/MDResolutionConvolutionFactoryTest.h b/Framework/MDAlgorithms/test/MDResolutionConvolutionFactoryTest.h
index 87f5ae837d9470175cb53138b6d367df31a055ff..04940d2a30a5492ceb5cbd082b037d0c22cb9b2d 100644
--- a/Framework/MDAlgorithms/test/MDResolutionConvolutionFactoryTest.h
+++ b/Framework/MDAlgorithms/test/MDResolutionConvolutionFactoryTest.h
@@ -30,7 +30,7 @@ public:
     TS_ASSERT_THROWS(
         MDResolutionConvolutionFactory::Instance().createConvolution(
             "__NOT_VALID", "FakeForeground", fakeFunction),
-        Exception::NotFoundError);
+        const Exception::NotFoundError &);
   }
 
   void
diff --git a/Framework/MDAlgorithms/test/MDTransfFactoryTest.h b/Framework/MDAlgorithms/test/MDTransfFactoryTest.h
index f44af1d98cddae7d9b9d2e8e6c4020252c6409f9..b07079eda5c75a94f2dc6bd154456b1ca3cb30f7 100644
--- a/Framework/MDAlgorithms/test/MDTransfFactoryTest.h
+++ b/Framework/MDAlgorithms/test/MDTransfFactoryTest.h
@@ -40,7 +40,7 @@ public:
   void testWrongAlgThrows() {
     TS_ASSERT_THROWS(
         MDTransfFactory::Instance().create("Non_existing_ChildAlgorithm"),
-        Kernel::Exception::NotFoundError);
+        const Kernel::Exception::NotFoundError &);
   }
 
   void testGetAlg() {
diff --git a/Framework/MDAlgorithms/test/MDTransfModQTest.h b/Framework/MDAlgorithms/test/MDTransfModQTest.h
index 6bfc058e24053fd6340895fb44bc79f49b3eae86..77215ff3c1894f8b77a83c1fffd3fc454fe7c5ea 100644
--- a/Framework/MDAlgorithms/test/MDTransfModQTest.h
+++ b/Framework/MDAlgorithms/test/MDTransfModQTest.h
@@ -177,7 +177,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "No detectors yet defined, so should thow run time error: ",
-        ModQTransf.initialize(WSDescr), std::runtime_error);
+        ModQTransf.initialize(WSDescr), const std::runtime_error &);
 
     // let's preprocess detectors positions to go any further
     WSDescr.m_PreprDetTable =
diff --git a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h
index 1aeff7a5f9bc644080dbf930d3d8706f39c7afd7..aee997b2d6e859655b3855f32767b6de8d35e2e7 100644
--- a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h
+++ b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h
@@ -113,7 +113,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "No detectors yet defined, so should thow run time error: ",
-        Q3DTransf.initialize(WSDescr), std::runtime_error);
+        Q3DTransf.initialize(WSDescr), const std::runtime_error &);
 
     // let's preprocess detectors positions to go any further
     WSDescr.m_PreprDetTable =
diff --git a/Framework/MDAlgorithms/test/MDWSDescriptionTest.h b/Framework/MDAlgorithms/test/MDWSDescriptionTest.h
index 7619bb18b63e21bd7cd4c6019aa34665193061a2..d6066217c32ad1665bdd9731cdeed116a5fb1f60 100644
--- a/Framework/MDAlgorithms/test/MDWSDescriptionTest.h
+++ b/Framework/MDAlgorithms/test/MDWSDescriptionTest.h
@@ -33,7 +33,7 @@ public:
 
     // dimensions (min-max) have not been set
     TS_ASSERT_THROWS(WSD.buildFromMatrixWS(ws2D, "|Q|", "Direct"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     std::vector<double> dimMin(2, -1);
     std::vector<double> dimMax(2, 1);
     WSD.setMinMax(dimMin, dimMax);
@@ -59,7 +59,7 @@ public:
 
     int binNumWrong[] = {120, 60, 200};
     nBins.assign(binNumWrong, binNumWrong + 3);
-    TS_ASSERT_THROWS(WSD.setNumBins(nBins), std::invalid_argument);
+    TS_ASSERT_THROWS(WSD.setNumBins(nBins), const std::invalid_argument &);
   }
   void testBuildFromMatrixWS4D() {
     MDWSDescription WSD;
@@ -70,7 +70,7 @@ public:
     PropNamews[1] = "P";
     // no property named "P" is attached to workspace
     TS_ASSERT_THROWS(WSD.buildFromMatrixWS(ws2D, "|Q|", "Direct", PropNamews),
-                     Exception::NotFoundError);
+                     const Exception::NotFoundError &);
 
     // H is attached
     PropNamews[1] = "H";
@@ -88,7 +88,7 @@ public:
 
     int binNumWrong[] = {120, 60};
     nBins.assign(binNumWrong, binNumWrong + 2);
-    TS_ASSERT_THROWS(WSD.setNumBins(nBins), std::invalid_argument);
+    TS_ASSERT_THROWS(WSD.setNumBins(nBins), const std::invalid_argument &);
 
     int binNumRight[] = {120, 60, 200, 100};
     nBins.assign(binNumRight, binNumRight + 4);
diff --git a/Framework/MDAlgorithms/test/MDWSTransfTest.h b/Framework/MDAlgorithms/test/MDWSTransfTest.h
index c7f67afb682f29a9a85dec2fff4049ba441074bd..a65c140402b1665b1d09656295a0cc7ce893f958 100644
--- a/Framework/MDAlgorithms/test/MDWSTransfTest.h
+++ b/Framework/MDAlgorithms/test/MDWSTransfTest.h
@@ -93,13 +93,13 @@ public:
         "Forced HKL frame would not accept workspace without oriented lattice",
         Transf.getTransfMatrix(TargWSDescription, CnvrtToMD::HKLFrame,
                                CnvrtToMD::HKLScale),
-        std::invalid_argument);
+        const std::invalid_argument &);
     TSM_ASSERT_THROWS("Forced SampleFrame frame would not accept workspace "
                       "without goniometer defined",
                       Transf.getTransfMatrix(TargWSDescription,
                                              CnvrtToMD::SampleFrame,
                                              CnvrtToMD::HKLScale),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
     spws->mutableSample().setOrientedLattice(pLattice.get());
 
     WorkspaceCreationHelper::setGoniometer(spws, 20, 0, 0);
diff --git a/Framework/MDAlgorithms/test/MaskMDTest.h b/Framework/MDAlgorithms/test/MaskMDTest.h
index 23a0e7221efa0929f8703e233eef123bac280693..9280c00c6be02238956087b84b4200ade006e644 100644
--- a/Framework/MDAlgorithms/test/MaskMDTest.h
+++ b/Framework/MDAlgorithms/test/MaskMDTest.h
@@ -183,7 +183,7 @@ public:
     alg.setPropertyValue("Dimensions", "UnknownId, Axis1, Axis2");
     alg.setPropertyValue("Extents", "0,10,0,10,0,10");
     TSM_ASSERT_THROWS("Using an unknown name/id should throw", alg.execute(),
-                      std::runtime_error);
+                      const std::runtime_error &);
   }
 
   void test_mask_everything() {
diff --git a/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h b/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
index 11a5d6b314e78630959bf4af33bbd78450614ce8..1f55515da094a7e73a106f7ae8f880e2158d5313 100644
--- a/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
+++ b/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h
@@ -288,7 +288,7 @@ public:
     TSM_ASSERT("can not interpet the workspace as table workspace", tws);
 
     TSM_ASSERT_THROWS("No such column", tws->getColVector<int>("detMask"),
-                      std::runtime_error);
+                      const std::runtime_error &);
 
     TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("GetMaskState", "1"));
     TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("UpdateMasksInfo", "1"));
diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h
index 8736baddaf534e0c70fce79fad01a8a1f44c4fbd..180115c41c1f05854395aff28b480cab905d9bb8 100644
--- a/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h
+++ b/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h
@@ -35,7 +35,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kimin_equal_to_kimax_throws() {
@@ -46,7 +46,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kfmin_greater_than_kfmax_throws() {
@@ -57,7 +57,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kfmin_equal_to_kfmax_throws() {
@@ -68,7 +68,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_incident_theta_negative() {
@@ -79,7 +79,7 @@ public:
     double incidentTheta = -0.001; // Negative
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_incident_theta_too_large() {
@@ -90,7 +90,7 @@ public:
     double incidentTheta = 90.001; // Too large
     TS_ASSERT_THROWS(
         ReflectometryTransformKiKf(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_valid_construction_inputs() {
diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h
index 026c443fed1458530ce6a956e27b04c3ad407b4c..77de7ce921ea889cef6da1e3d730da414f9716bf 100644
--- a/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h
+++ b/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h
@@ -34,7 +34,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kimin_equal_to_kimax_throws() {
@@ -45,7 +45,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kfmin_greater_than_kfmax_throws() {
@@ -56,7 +56,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_kfmin_equal_to_kfmax_throws() {
@@ -67,7 +67,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_incident_theta_negative() {
@@ -78,7 +78,7 @@ public:
     double incidentTheta = -0.001; // Negative
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_incident_theta_too_large() {
@@ -89,7 +89,7 @@ public:
     double incidentTheta = 90.001; // Too large
     TS_ASSERT_THROWS(
         ReflectometryTransformP(kiMin, kiMax, kfMin, kfMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_valid_construction_inputs() {
diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h
index 4ffaf00d36b00ec760cf5fb858f7fa9adaf5ef06..4458a3c816f67c664f6e4d0227b712be0884341d 100644
--- a/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h
+++ b/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h
@@ -38,7 +38,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_qxmin_equal_to_qxmax_throws() {
@@ -49,7 +49,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_qzmin_greater_than_qzmax_throws() {
@@ -60,7 +60,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_qzmin_equal_to_qzmax_throws() {
@@ -71,7 +71,7 @@ public:
     double incidentTheta = 1;
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_incident_theta_negative() {
@@ -82,7 +82,7 @@ public:
     double incidentTheta = -0.001; // Negative
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_incident_theta_too_large() {
@@ -93,7 +93,7 @@ public:
     double incidentTheta = 90.001; // Too large
     TS_ASSERT_THROWS(
         ReflectometryTransformQxQz(qxMin, qxMax, qzMin, qzMax, incidentTheta),
-        std::out_of_range);
+        const std::out_of_range &);
   }
 
   void test_valid_construction_inputs() {
diff --git a/Framework/MDAlgorithms/test/ReplicateMDTest.h b/Framework/MDAlgorithms/test/ReplicateMDTest.h
index b767172a1962dd506a8ceb016197e24af0e7b5b3..ef46a7622cfda382a63ffee69f8f87e6b44da391 100644
--- a/Framework/MDAlgorithms/test/ReplicateMDTest.h
+++ b/Framework/MDAlgorithms/test/ReplicateMDTest.h
@@ -390,7 +390,7 @@ public:
     alg.setProperty("DataWorkspace", dataWSTranspose);
     alg.setProperty("ShapeWorkspace", shapeWS);
     alg.setPropertyValue("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_wrong_number_of_dimensions() {
@@ -408,7 +408,7 @@ public:
     alg.setProperty("DataWorkspace", dataWSTranspose);
     alg.setProperty("ShapeWorkspace", shapeWS);
     alg.setPropertyValue("OutputWorkspace", "dummy");
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/MDAlgorithms/test/TobyFitResolutionModelTest.h b/Framework/MDAlgorithms/test/TobyFitResolutionModelTest.h
index 35ee9ad748874dadb517090a9088943f2427319d..317a6a891af6bb5d2991fd1df7ecbca7dbf70c6f 100644
--- a/Framework/MDAlgorithms/test/TobyFitResolutionModelTest.h
+++ b/Framework/MDAlgorithms/test/TobyFitResolutionModelTest.h
@@ -39,7 +39,7 @@ public:
     ResolutionConvolvedCrossSection *conv = new ResolutionConvolvedCrossSection;
 
     TS_ASSERT_THROWS(TobyFitResolutionModel(*conv, "_NotAKnownModel"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     delete conv;
   }
diff --git a/Framework/MDAlgorithms/test/WeightedMeanMDTest.h b/Framework/MDAlgorithms/test/WeightedMeanMDTest.h
index 50c8bfe60c78b8a25a2f8952046a10c1f3eab787..de5c901f0c85aa4b93c4da1880388820f9c33e87 100644
--- a/Framework/MDAlgorithms/test/WeightedMeanMDTest.h
+++ b/Framework/MDAlgorithms/test/WeightedMeanMDTest.h
@@ -71,7 +71,7 @@ private:
     alg.setProperty("LHSWorkspace", a);
     alg.setProperty("RHSWorkspace", b);
     alg.setPropertyValue("OutputWorkspace", outName);
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
   }
 
 public:
diff --git a/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h b/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h
index 522f8f8cff1435f158484fc9453711ef857b15ee..12f3d19850e0870c8840a4917aa6ef25e9a9393e 100644
--- a/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h
+++ b/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h
@@ -43,7 +43,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         broadcaster.setPropertyValue("OutputWorkspace", "blah"));
     TS_ASSERT_THROWS(broadcaster.setProperty("BroadcasterRank", 1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testExecute() {
diff --git a/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h b/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h
index 410e6d0c5de4dc0a5e2ab6c64306b7abe5392f57..78f131285f77226018c94441170662eb0629028c 100644
--- a/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h
+++ b/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h
@@ -45,7 +45,7 @@ public:
         gatherer.setProperty("OutputWorkspace", "something"));
     // Haven't set InputWorkspace and this will be the root process, so it
     // should complain
-    TS_ASSERT_THROWS(gatherer.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(gatherer.execute(), const std::runtime_error &);
     TS_ASSERT(!gatherer.isExecuted());
   }
 
diff --git a/Framework/Muon/src/MuonAlgorithmHelper.cpp b/Framework/Muon/src/MuonAlgorithmHelper.cpp
index 90e1e698f16f59f42e467ef3965976eba278207b..2dff1b018b254ee5a3941516f5ef19552bf5f301 100644
--- a/Framework/Muon/src/MuonAlgorithmHelper.cpp
+++ b/Framework/Muon/src/MuonAlgorithmHelper.cpp
@@ -478,7 +478,7 @@ bool checkValidPair(const std::string &WSname1, const std::string &WSname2) {
   try {
     group1 = parseWorkspaceName(WSname1);
     group2 = parseWorkspaceName(WSname2);
-  } catch (std::invalid_argument) {
+  } catch (const std::invalid_argument &) {
     throw std::invalid_argument(
         "Ensure workspaces have the correctly formatted name (see "
         "documentation).");
diff --git a/Framework/Muon/test/ApplyDeadTimeCorrTest.h b/Framework/Muon/test/ApplyDeadTimeCorrTest.h
index 9ac7ca16a89ebb5e587f29c46cfacb90e263a605..1858993bcefa2adaed175407183eb2fc716b7004 100644
--- a/Framework/Muon/test/ApplyDeadTimeCorrTest.h
+++ b/Framework/Muon/test/ApplyDeadTimeCorrTest.h
@@ -108,7 +108,7 @@ public:
         applyDeadTime.setProperty("DeadTimeTable", deadTimes));
     TS_ASSERT_THROWS_NOTHING(
         applyDeadTime.setProperty("OutputWorkspace", "__NotUsed"));
-    TS_ASSERT_THROWS(applyDeadTime.execute(), std::logic_error);
+    TS_ASSERT_THROWS(applyDeadTime.execute(), const std::logic_error &);
 
     // Check new table wasn't created
     MatrixWorkspace_sptr output = applyDeadTime.getProperty("OutputWorkspace");
@@ -194,7 +194,7 @@ public:
     applyDT.initialize();
     applyDT.setChild(true);
     TS_ASSERT_THROWS(applyDT.setProperty("InputWorkspace", rebinned),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   // Test that algorithm throws if input workspace does not contain number of
@@ -216,7 +216,7 @@ public:
         applyDeadTime.setProperty("DeadTimeTable", deadTimes));
     TS_ASSERT_THROWS_NOTHING(
         applyDeadTime.setProperty("OutputWorkspace", "__NotUsed"));
-    TS_ASSERT_THROWS(applyDeadTime.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(applyDeadTime.execute(), const std::invalid_argument &);
     TS_ASSERT(!applyDeadTime.isExecuted());
   }
 
diff --git a/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h b/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h
index 068febcfc13b0a85a99ef8a82212021da78cf7cd..f01ffe8358f5e9c336f9d1a0ef0ea7501a6beb25 100644
--- a/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h
+++ b/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h
@@ -122,7 +122,7 @@ public:
                                              ",", ";", ":"};
     for (auto badName : badPairNames) {
       alg.setProperty("PairName", badName);
-      TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+      TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
       TS_ASSERT(!alg.isExecuted());
     }
   }
@@ -139,7 +139,7 @@ public:
     std::vector<double> badAlphas = {0.0, -1.0};
     for (auto badAlpha : badAlphas) {
       alg.setProperty("Alpha", badAlpha);
-      TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+      TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
       TS_ASSERT(!alg.isExecuted());
     }
   }
@@ -159,7 +159,7 @@ public:
     for (size_t i = 0; i < badGroup1.size(); i++) {
       alg.setProperty("Group1", badGroup1[i]);
       alg.setProperty("Group2", badGroup2[i]);
-      TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+      TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
       TS_ASSERT(!alg.isExecuted());
     }
   }
@@ -175,7 +175,7 @@ public:
 
     alg.setProperty("TimeMin", 10.0);
     alg.setProperty("TimeMax", 5.0);
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -198,14 +198,14 @@ public:
     for (auto &&badPeriod : badPeriods) {
       alg.setProperty("SummedPeriods", badPeriod);
       // This throw comes from MuonProcess
-      TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+      TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
       TS_ASSERT(!alg.isExecuted());
     }
 
     for (auto &&badPeriod : badPeriods) {
       alg.setProperty("SubtractedPeriods", badPeriod);
       // This throw comes from MuonProcess
-      TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+      TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
       TS_ASSERT(!alg.isExecuted());
     }
   }
@@ -299,7 +299,7 @@ public:
     // Expects 10 IDs
     setPairAlgorithmProperties(alg, setup.inputWSName, setup.groupWSName);
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_summingPeriodsGivesCorrectAsymmetryValues() {
@@ -465,7 +465,7 @@ public:
     alg.setProperty("InputWorkspace1", groupWS1Name);
     alg.setProperty("InputWorkspace2", groupWS2Name);
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 
   void test_inputWorkspaceWithDifferentTimeAxisFails() {
@@ -493,7 +493,7 @@ public:
     alg.setProperty("InputWorkspace1", groupWS1Name);
     alg.setProperty("InputWorkspace2", groupWS2Name);
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Muon/test/AsymmetryCalcTest.h b/Framework/Muon/test/AsymmetryCalcTest.h
index 05e4a343a9183e4ff907d5c1d2279e186e4247f6..187535395a6c99aaf2e5a9397384c1512505c13f 100644
--- a/Framework/Muon/test/AsymmetryCalcTest.h
+++ b/Framework/Muon/test/AsymmetryCalcTest.h
@@ -139,11 +139,11 @@ public:
     asymCalc.setPropertyValue("ForwardSpectra", "1");
     asymCalc.setPropertyValue("BackwardSpectra", "3");
     // Bad spectrum number for BackwardSpectra
-    TS_ASSERT_THROWS(asymCalc.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(asymCalc.execute(), const std::runtime_error &);
     asymCalc.setPropertyValue("BackwardSpectra", "1");
     asymCalc.setPropertyValue("ForwardSpectra", "3");
     // Bad spectrum number for ForwardSpectra
-    TS_ASSERT_THROWS(asymCalc.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(asymCalc.execute(), const std::runtime_error &);
   }
 
   /**
diff --git a/Framework/Muon/test/CalMuonDeadTimeTest.h b/Framework/Muon/test/CalMuonDeadTimeTest.h
index 96b5126ed836321203da65667603a87844a34998..edbecc2dcaf74efc63c10b6814e4c2a692e51f4b 100644
--- a/Framework/Muon/test/CalMuonDeadTimeTest.h
+++ b/Framework/Muon/test/CalMuonDeadTimeTest.h
@@ -89,7 +89,7 @@ public:
     calDeadTime.setPropertyValue("FirstGoodData", "1.0");
     calDeadTime.setPropertyValue("LastGoodData", "2.0");
 
-    TS_ASSERT_THROWS(calDeadTime.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(calDeadTime.execute(), const std::runtime_error &);
     TS_ASSERT(!calDeadTime.isExecuted());
   }
 
diff --git a/Framework/Muon/test/CalMuonDetectorPhasesTest.h b/Framework/Muon/test/CalMuonDetectorPhasesTest.h
index e50956b3f3d195fe2acd3be4e4c1a2ed4121af7d..c41fef69f87c930e53dc560017ca81911e118c84 100644
--- a/Framework/Muon/test/CalMuonDetectorPhasesTest.h
+++ b/Framework/Muon/test/CalMuonDetectorPhasesTest.h
@@ -74,7 +74,7 @@ public:
     calc->setProperty("ForwardSpectra", std::vector<int>{1});
     calc->setProperty("BackwardSpectra", std::vector<int>{2});
 
-    TS_ASSERT_THROWS(calc->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(calc->execute(), const std::runtime_error &);
     TS_ASSERT(!calc->isExecuted());
   }
 
@@ -90,7 +90,7 @@ public:
     calc->setProperty("ForwardSpectra", std::vector<int>{1});
     calc->setProperty("BackwardSpectra", std::vector<int>{2});
 
-    TS_ASSERT_THROWS(calc->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(calc->execute(), const std::runtime_error &);
     TS_ASSERT(!calc->isExecuted());
   }
 
diff --git a/Framework/Muon/test/CalculateMuonAsymmetryTest.h b/Framework/Muon/test/CalculateMuonAsymmetryTest.h
index 76a88d6c95b09787554b86fe373bf62a985b331c..f770f0ae39e790b6708d7643089e1483d5af6a05 100644
--- a/Framework/Muon/test/CalculateMuonAsymmetryTest.h
+++ b/Framework/Muon/test/CalculateMuonAsymmetryTest.h
@@ -224,7 +224,7 @@ public:
     IAlgorithm_sptr alg = setUpAlg(table, func, wsNames, wsOut);
     alg->setProperty("StartX", 10.);
     alg->setProperty("EndX", 1.);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     clearADS();
   }
 
@@ -237,7 +237,7 @@ public:
     auto table = genTable();
 
     IAlgorithm_sptr alg = setUpAlg(table, func, wsNames, wsOut);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     clearADS();
   }
 
@@ -252,7 +252,7 @@ public:
     wsNames = {"ws1"};
 
     IAlgorithm_sptr alg = setUpAlg(table, func, wsNames, wsOut);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
     clearADS();
   }
 
diff --git a/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h b/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h
index 1210ebe984a72d9aa54941d51e93f22a9980d8f1..761dec46c9a2b716be364e5aceaf43e7afac8a3e 100644
--- a/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h
+++ b/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h
@@ -199,7 +199,7 @@ public:
     alg->setProperty("StartX", 0.1);
     alg->setProperty("EndX", 0.1);
     alg->setProperty("OutputWorkspace", outputName);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
   void test_BackwardsRange() {
     auto ws = createWorkspace(1, 50);
@@ -211,7 +211,7 @@ public:
     alg->setProperty("StartX", 0.9);
     alg->setProperty("EndX", 0.1);
     alg->setProperty("OutputWorkspace", outputName);
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
   void test_NumberOfDataPoints() {
 
diff --git a/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h b/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h
index 389e5043090c6af7bb1c5e8c13d00c8c5421384e..412115eba1bc5f6284e3d2076900c226491bf8b7 100644
--- a/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h
+++ b/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h
@@ -305,7 +305,7 @@ public:
         MuonGroupingXMLHelper::createGroupingXMLSingleGroup("group_", "1-2");
 
     auto alg = algorithmWithPropertiesSet(ws->getName(), file.getFileName());
-    TS_ASSERT_THROWS(alg->execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg->execute(), const std::invalid_argument &);
   }
 
   void test_throws_if_pair_contains_non_existant_group() {
@@ -317,7 +317,8 @@ public:
         "pair1", "nonExistantGroup");
 
     auto alg = algorithmWithPropertiesSet(ws->getName(), file.getFileName());
-    TS_ASSERT_THROWS(alg->execute(), Mantid::Kernel::Exception::FileError);
+    TS_ASSERT_THROWS(alg->execute(),
+                     const Mantid::Kernel::Exception::FileError &);
   }
 
   void test_throws_when_file_has_detectors_which_are_not_in_workspace() {
@@ -329,7 +330,7 @@ public:
         MuonGroupingXMLHelper::createGroupingXMLSingleGroup("test", group);
     auto alg = algorithmWithPropertiesSet(ws->getName(), file.getFileName());
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_rebinning_applied_correctly() {
diff --git a/Framework/Muon/test/MuonAlgorithmHelperTest.h b/Framework/Muon/test/MuonAlgorithmHelperTest.h
index 9411faf945fcba43205960f1b00e996371930155..842459c45ca3c527eb6c04a31d2a81a3c0f61b9a 100644
--- a/Framework/Muon/test/MuonAlgorithmHelperTest.h
+++ b/Framework/Muon/test/MuonAlgorithmHelperTest.h
@@ -476,7 +476,7 @@ public:
 
     for (auto &&invalidName : invalidWorkspaceNames)
       TS_ASSERT_THROWS(checkValidPair(validWorkspaceName, invalidName),
-                       std::invalid_argument);
+                       const std::invalid_argument &);
   }
 
   void test_checkValidPair_throws_if_ItemType_Asym() {
@@ -485,7 +485,7 @@ public:
     const std::string invalidWorkspaceName =
         "EMU000015189; Group; fwd; Asym; 1+2; #1";
     TS_ASSERT_THROWS(checkValidPair(validWorkspaceName, invalidWorkspaceName),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_checkValidPair_throws_if_different_instruments() {
@@ -494,7 +494,7 @@ public:
     const std::string invalidWorkspaceName =
         "MUSR00015189; Group; fwd; Counts; 1+2; #1";
     TS_ASSERT_THROWS(checkValidPair(validWorkspaceName, invalidWorkspaceName),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_checkValidPair_does_not_throw_if_same_group() {
@@ -503,7 +503,7 @@ public:
     const std::string invalidWorkspaceName =
         "EMU000015189; Group; fwd; Counts; 1+2; #1";
     TS_ASSERT_THROWS(checkValidPair(validWorkspaceName, invalidWorkspaceName),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_checkValidGroupPairName_invalid_names() {
diff --git a/Framework/Muon/test/MuonGroupingAsymmetryTest.h b/Framework/Muon/test/MuonGroupingAsymmetryTest.h
index 2d6c83b1117ed62b583ab77f4d43ba3377d1033e..a836c56a2cad8b5dbc49b173af3da01b7ef973e4 100644
--- a/Framework/Muon/test/MuonGroupingAsymmetryTest.h
+++ b/Framework/Muon/test/MuonGroupingAsymmetryTest.h
@@ -130,7 +130,7 @@ public:
     IAlgorithm_sptr alg =
         algorithmWithWorkspacePropertiesSet(setup.inputWSName);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -188,7 +188,7 @@ public:
     alg->setProperty("SummedPeriods", summedPeriods);
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -200,7 +200,7 @@ public:
     const std::vector<int> summedPeriods = {3};
     alg->setProperty("SummedPeriods", summedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -212,7 +212,7 @@ public:
     const std::vector<int> subtractedPeriods = {3};
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_algorithm_fails_if_summed_periods_has_negative_entry() {
@@ -223,7 +223,7 @@ public:
     const std::vector<int> summedPeriods = {-1};
     alg->setProperty("SummedPeriods", summedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_algorithm_fails_if_subtracted_periods_has_negative_entry() {
@@ -234,7 +234,7 @@ public:
     const std::vector<int> subtractedPeriods = {-1};
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   // --------------------------------------------------------------------------
diff --git a/Framework/Muon/test/MuonGroupingCountsTest.h b/Framework/Muon/test/MuonGroupingCountsTest.h
index 2d3b2fc1d1308fdd52e9fb5b642f670d8ab94001..bd645bad5408af8934e2ab2121cf44f051656c12 100644
--- a/Framework/Muon/test/MuonGroupingCountsTest.h
+++ b/Framework/Muon/test/MuonGroupingCountsTest.h
@@ -152,7 +152,7 @@ public:
     IAlgorithm_sptr alg =
         algorithmWithoutOptionalPropertiesSet(setup.inputWSName);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -203,7 +203,7 @@ public:
     alg->setProperty("SummedPeriods", summedPeriods);
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -215,7 +215,7 @@ public:
     std::vector<int> summedPeriods = {3};
     alg->setProperty("SummedPeriods", summedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -227,7 +227,7 @@ public:
     std::vector<int> subtractedPeriods = {3};
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   // --------------------------------------------------------------------------
diff --git a/Framework/Muon/test/MuonPairingAsymmetryTest.h b/Framework/Muon/test/MuonPairingAsymmetryTest.h
index 41c738a7174023de7aeb20beb38a18022e8f019c..e058ef11d519e5905f5b5350184de1813f91f634 100644
--- a/Framework/Muon/test/MuonPairingAsymmetryTest.h
+++ b/Framework/Muon/test/MuonPairingAsymmetryTest.h
@@ -230,7 +230,7 @@ public:
     IAlgorithm_sptr alg = algorithmWithoutOptionalPropertiesSet(
         setup.inputWSName, "", group1, group2);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -320,7 +320,7 @@ public:
     alg->setProperty("SummedPeriods", summedPeriods);
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -331,7 +331,7 @@ public:
     std::vector<int> summedPeriods = {3};
     alg->setProperty("SummedPeriods", summedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -342,7 +342,7 @@ public:
     std::vector<int> subtractedPeriods = {3};
     alg->setProperty("SubtractedPeriods", subtractedPeriods);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   // --------------------------------------------------------------------------
diff --git a/Framework/Muon/test/MuonPreProcessTest.h b/Framework/Muon/test/MuonPreProcessTest.h
index 1dcf393af1f6e7c9ccced9b78e4021c94f572e3c..d8e7c2234b00d4f340e43601d323f8c473b970ff 100644
--- a/Framework/Muon/test/MuonPreProcessTest.h
+++ b/Framework/Muon/test/MuonPreProcessTest.h
@@ -152,7 +152,7 @@ public:
     alg->setProperty("TimeMin", 0.6);
     alg->setProperty("TimeMax", 0.4);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_that_negative_TimeMin_is_an_accepted_input() {
@@ -173,7 +173,7 @@ public:
     alg->setProperty("TimeMin", 0.5);
     alg->setProperty("TimeMax", 0.5);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void test_that_TimeMin_and_TimeMax_both_in_same_bin_throws_logic_error() {
@@ -189,7 +189,7 @@ public:
     alg->setProperty("TimeMax", 0.58);
 
     // Expect runtime error as alg is set to rethrow
-    TS_ASSERT_THROWS(alg->execute(), std::logic_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::logic_error &);
   }
 
   // --------------------------------------------------------------------------
@@ -205,7 +205,7 @@ public:
 
     auto alg = setUpAlgorithmWithDeadTimeTable(ws, deadTimeTable);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   // --------------------------------------------------------------------------
@@ -415,7 +415,7 @@ public:
     WorkspaceGroup_sptr wsGroup = boost::make_shared<WorkspaceGroup>();
     auto alg = setUpAlgorithmWithNoOptionalProperties(wsGroup);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 
   void
@@ -428,7 +428,7 @@ public:
     wsGroup->addWorkspace(wsTwoSpectra);
     auto alg = setUpAlgorithmWithNoOptionalProperties(wsGroup);
 
-    TS_ASSERT_THROWS(alg->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg->execute(), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/Muon/test/PhaseQuadMuonTest.h b/Framework/Muon/test/PhaseQuadMuonTest.h
index 2d53354ca7658d5bb30f5a72792b624927c071ca..28dc4ba562a6906858e563707de51a4293aa7554 100644
--- a/Framework/Muon/test/PhaseQuadMuonTest.h
+++ b/Framework/Muon/test/PhaseQuadMuonTest.h
@@ -258,23 +258,23 @@ public:
   void testNoPhase() {
     std::vector<std::string> names = {"ID", "Asym", "dummy"};
     IAlgorithm_sptr phaseQuad = setupAlg(m_loadedData, true, names);
-    TS_ASSERT_THROWS(phaseQuad->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(phaseQuad->execute(), const std::runtime_error &);
   }
   void testNoAsymm() {
     std::vector<std::string> names = {"ID", "AsYMg", "phase"};
     MatrixWorkspace_sptr m_loadedData = loadMuonDataset();
     IAlgorithm_sptr phaseQuad = setupAlg(m_loadedData, true, names);
-    TS_ASSERT_THROWS(phaseQuad->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(phaseQuad->execute(), const std::runtime_error &);
   }
   void testTwoPhases() {
     std::vector<std::string> names = {"ID", "Phase", "phi"};
     IAlgorithm_sptr phaseQuad = setupAlg(m_loadedData, true, names);
-    TS_ASSERT_THROWS(phaseQuad->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(phaseQuad->execute(), const std::runtime_error &);
   }
   void testTwoAsymm() {
     std::vector<std::string> names = {"ID", "Asym", "Asymm"};
     IAlgorithm_sptr phaseQuad = setupAlg(m_loadedData, true, names);
-    TS_ASSERT_THROWS(phaseQuad->execute(), std::runtime_error);
+    TS_ASSERT_THROWS(phaseQuad->execute(), const std::runtime_error &);
   }
   void testSwapOrder() {
     std::vector<std::string> names = {"ID", "phase", "Asymm"};
diff --git a/Framework/Muon/test/PlotAsymmetryByLogValueTest.h b/Framework/Muon/test/PlotAsymmetryByLogValueTest.h
index af319ec7f00f905eae5c0b3221fa8c609ffb48c1..8288e0936b963c8ce29702f29a9566ea1bf15b1c 100644
--- a/Framework/Muon/test/PlotAsymmetryByLogValueTest.h
+++ b/Framework/Muon/test/PlotAsymmetryByLogValueTest.h
@@ -445,7 +445,7 @@ public:
     alg.setPropertyValue("LastRun", firstRun);
     alg.setPropertyValue("OutputWorkspace", ws);
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/Parallel/test/EventLoaderTest.h b/Framework/Parallel/test/EventLoaderTest.h
index fc79ad2933c01d70c2d3f23227c5809c2e30a343..c0e05123ea9cc1b79cf0eb64a97c25a51aa1099f 100644
--- a/Framework/Parallel/test/EventLoaderTest.h
+++ b/Framework/Parallel/test/EventLoaderTest.h
@@ -164,7 +164,7 @@ public:
   void test_throws_if_file_does_not_exist() {
     TS_ASSERT_THROWS(
         EventLoader::load(Communicator{}, "abcdefg", "", {}, {}, {}),
-        H5::FileIException);
+        const H5::FileIException &);
   }
 
   void test_H5DataType_parameter_pack_conversion() {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp
index 8bc2dfe5dce8c3fa36fcf93862ed9740ae56274b..9f487fe82ac8fd3e22af57d227e323f6cc6f20ae 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp
@@ -16,10 +16,7 @@ using namespace boost::python;
 
 namespace {
 template <class Base>
-using loadOverload1 =
-    Workspace_sptr (DataProcessorAdapter<Base>::*)(const std::string &);
-template <class Base>
-using loadOverload2 = Workspace_sptr (DataProcessorAdapter<Base>::*)(
+using loadOverload = Workspace_sptr (DataProcessorAdapter<Base>::*)(
     const std::string &, const bool);
 
 template <class Base> void do_export(const std::string &name) {
@@ -59,13 +56,8 @@ template <class Base> void do_export(const std::string &name) {
       .def("loadChunk", &Adapter::loadChunkProxy,
            (arg("self"), arg("row_index")), "Load a chunk of data")
 
-      .def("load", (loadOverload1<Base>)&Adapter::loadProxy,
-           (arg("self"), arg("input_data")),
-           "Loads the given file or workspace data and returns the workspace. "
-           "The output is not stored in the AnalysisDataService.")
-
-      .def("load", (loadOverload2<Base>)&Adapter::loadProxy,
-           (arg("self"), arg("input_data"), arg("load_quite")),
+      .def("load", (loadOverload<Base>)&Adapter::loadProxy,
+           (arg("self"), arg("input_data"), arg("load_quiet") = false),
            "Loads the given file or workspace data and returns the workspace. "
            "If loadQuiet=True then output is not stored in the "
            "AnalysisDataService.")
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp
index 522254a7aa07338e6c3beebc876e8d19afcf8612..63d94644c541c36f3e2c419abd5a446701db3c96 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp
@@ -19,7 +19,7 @@ void export_IPeakFunction() {
       "IPeakFunction", "Base class for peak Fit functions")
       .def("functionLocal",
            (object(IPeakFunctionAdapter::*)(const object &) const) &
-               IPeakFunction::functionLocal,
+               IPeakFunctionAdapter::functionLocal,
            (arg("self"), arg("vec_x")),
            "Calculate the values of the function for the given x values. The "
            "output should be stored in the out array")
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp
index 82b045e929a3ee94375251c364c650f649c08e25..c57fa35d0eabb14a776a460040a9d44f543af1cf 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp
@@ -35,17 +35,18 @@ void export_Instrument() {
            "represents the source")
 
       .def("getComponentByName",
-           (boost::shared_ptr<IComponent>(Instrument::*)(const std::string &)) &
+           (boost::shared_ptr<const IComponent>(CompAssembly::*)(
+               const std::string &, int) const) &
                Instrument::getComponentByName,
            (arg("self"), arg("cname")),
            "Returns the named :class:`~mantid.geometry.Component`")
 
-      .def(
-          "getDetector",
-          (boost::shared_ptr<IDetector>(Instrument::*)(const detid_t &) const) &
-              Instrument::getDetector,
-          (arg("self"), arg("detector_id")),
-          "Returns the :class:`~mantid.geometry.Detector` with the given ID")
+      .def("getDetector",
+           (boost::shared_ptr<const IDetector>(Instrument::*)(const detid_t &)
+                const) &
+               Instrument::getDetector,
+           (arg("self"), arg("detector_id")),
+           "Returns the :class:`~mantid.geometry.Detector` with the given ID")
 
       .def("getReferenceFrame",
            (boost::shared_ptr<const ReferenceFrame>(Instrument::*)()) &
diff --git a/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h b/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h
index 5bd5492e899cc31e75263c216f01912daccc3467..17b9311878a89ca4d0fb8a444605357dd18a7372 100644
--- a/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h
+++ b/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h
@@ -35,7 +35,7 @@ public:
     std::array<double, 1> xvalues{{10}}, retvalue{{0}};
     TS_ASSERT_THROWS(
         badReturnFunc1D->function1D(retvalue.data(), xvalues.data(), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testfunction1D_Returning_Numpy_Array_With_NonFloat_Type_Throws() {
@@ -52,7 +52,7 @@ public:
     std::array<double, 1> xvalues{{10}}, retvalue{{0}};
     TS_ASSERT_THROWS(
         badNdArrayFunc1D->function1D(retvalue.data(), xvalues.data(), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   // -------------- Success tests -------------------------
diff --git a/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h b/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h
index ec3d2157ad2365cd026a0037df0dd2d419138487..d5714e6d2af2973aa8a8592d9ce1b86a1e05c9e3 100644
--- a/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h
+++ b/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h
@@ -36,7 +36,7 @@ public:
     std::array<double, 1> xvalues{{10}}, retvalue{{0}};
     TS_ASSERT_THROWS(
         badReturnFunc->function1D(retvalue.data(), xvalues.data(), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testfunctionLocal_Returning_Numpy_Array_With_NonFloat_Type_Throws() {
@@ -53,7 +53,7 @@ public:
     std::array<double, 1> xvalues{{10}}, retvalue{{0}};
     TS_ASSERT_THROWS(
         badNdArrayFunc->function1D(retvalue.data(), xvalues.data(), 1),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   // -------------- Success tests -------------------------
diff --git a/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h b/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h
index 6fef58fa8eeceb968d3328702ffbfeaeca098ae7..79900f8ca4178361836975d82836b8fd4644e269 100644
--- a/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h
+++ b/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h
@@ -54,7 +54,7 @@ public:
     using PySequenceToVectorInt = PySequenceToVector<int>;
     std::vector<int> cvector;
     TS_ASSERT_THROWS(cvector = PySequenceToVectorInt(testlist)(),
-                     boost::python::error_already_set);
+                     const boost::python::error_already_set &);
   }
 
   /// Creates a python list where all of the types are the same
diff --git a/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h b/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h
index ab2fceed48092269a148d4e644feeb7035959d83..91e5ea84994abacddec0ae5ea525c4019c1064b6 100644
--- a/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h
+++ b/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h
@@ -34,7 +34,7 @@ public:
 public:
   void test_Bare_Pointer_Throws_On_Creation() {
     TS_ASSERT_THROWS(instantiator().createUnwrappedInstance(),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_Shared_Pointer() {
diff --git a/Framework/PythonInterface/test/cpp/ToPyListTest.h b/Framework/PythonInterface/test/cpp/ToPyListTest.h
index fd94965ea443dcbcf4b0780836138c41b364e757..d340afcd9470aae9c11e291b2bd729e2860aed59 100644
--- a/Framework/PythonInterface/test/cpp/ToPyListTest.h
+++ b/Framework/PythonInterface/test/cpp/ToPyListTest.h
@@ -30,7 +30,7 @@ public:
   void test_unregistered_element_type_throws_runtime_error() {
     std::vector<UnregisteredType> unknownElements{UnregisteredType()};
     TS_ASSERT_THROWS(ToPyList<UnregisteredType>()(unknownElements),
-                     boost::python::error_already_set);
+                     const boost::python::error_already_set &);
   }
 
 private:
diff --git a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
index bd57c037ee9ed1937809b62ae31c9ae0fd036299..b6ff482701a69dc18932660aab8c6e64431b173e 100644
--- a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
+++ b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
@@ -55,7 +55,8 @@ BOOST_PYTHON_MODULE(WorkspaceCreationHelper) {
   //===================================
 
   // Function pointers to disambiguate the calls
-  using Signature1_2D = Workspace2D_sptr (*)(int, int, bool, bool);
+  using Signature1_2D = Workspace2D_sptr (*)(int, int, bool, bool, bool,
+                                             const std::string &, bool);
   using Signature2_2D = Workspace2D_sptr (*)(int, int, int);
   using Signature3_2D = Workspace2D_sptr (*)(int, int, int, int);
 
@@ -82,7 +83,7 @@ BOOST_PYTHON_MODULE(WorkspaceCreationHelper) {
   //===================================
 
   def("createPeaksWorkspace",
-      reinterpret_cast<PeaksWorkspace_sptr (*)(const int)>(
+      reinterpret_cast<PeaksWorkspace_sptr (*)(const int, bool)>(
           createPeaksWorkspace),
       return_value_policy<AsType<Workspace_sptr>>());
   def("createPeaksWorkspace",
@@ -93,8 +94,9 @@ BOOST_PYTHON_MODULE(WorkspaceCreationHelper) {
   //===================================
 
   // Typedef for function pointer to disabiguate references
-  using Signature1_MDHisto = MDHistoWorkspace_sptr (*)(
-      double, size_t, size_t, Mantid::coord_t, double, std::string, double);
+  using Signature1_MDHisto =
+      MDHistoWorkspace_sptr (*)(double, size_t, size_t, Mantid::coord_t, double,
+                                const std::string &, double);
 
   def("makeFakeMDHistoWorkspace", (Signature1_MDHisto)&makeFakeMDHistoWorkspace,
       makeFakeMDHistoWorkspace_overloads()
diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h
index 8ab884af9edea31b60cea39ca3107dd9db3baf3c..c750685a4d932e8ed7a8233c2b66d1619aee258d 100644
--- a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h
+++ b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     AbortRemoteJob2 alg3;
@@ -75,7 +75,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(alg1.setPropertyValue("JobID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -83,11 +83,11 @@ public:
     AbortRemoteJob2 ab;
     TS_ASSERT_THROWS_NOTHING(ab.initialize();)
     TS_ASSERT_THROWS(ab.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ab.setPropertyValue("username", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ab.setPropertyValue("sername", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_wrongResource() {
@@ -95,7 +95,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(ab.initialize());
     // the compute resource given  does not exist:
     TS_ASSERT_THROWS(ab.setPropertyValue("ComputeResource", "missing c r!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h
index 3688923a6a852e1d1419a7f284fa1023572a505a..8d08bc48543178acad8652f48c52e6cbda947e2b 100644
--- a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h
+++ b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h
@@ -63,9 +63,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     AbortRemoteJob alg3;
@@ -73,7 +73,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(alg1.setPropertyValue("JobID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -81,11 +81,11 @@ public:
     AbortRemoteJob ab;
     TS_ASSERT_THROWS_NOTHING(ab.initialize();)
     TS_ASSERT_THROWS(ab.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ab.setPropertyValue("username", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ab.setPropertyValue("sername", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_wrongResource() {
@@ -93,7 +93,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(ab.initialize());
     // the compute resource given  does not exist:
     TS_ASSERT_THROWS(ab.setPropertyValue("ComputeResource", "missing c r!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/Authenticate2Test.h b/Framework/RemoteAlgorithms/test/Authenticate2Test.h
index e8a39e62872766727286748c5e1a05e5f77142fb..71b557a06f523c84af99f4ab4dd92144dd0bbec4 100644
--- a/Framework/RemoteAlgorithms/test/Authenticate2Test.h
+++ b/Framework/RemoteAlgorithms/test/Authenticate2Test.h
@@ -63,9 +63,9 @@ public:
     // password missing
     TS_ASSERT_THROWS_NOTHING(alg1.setPropertyValue("UserName", "john_missing"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     Authenticate2 alg2;
@@ -73,9 +73,9 @@ public:
     // username missing
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("Password", "LogIn"));
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     Authenticate2 alg3;
@@ -84,7 +84,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("UserName", "john_missing"));
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("Password", "LogIn"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -92,11 +92,11 @@ public:
     Authenticate2 auth;
     TS_ASSERT_THROWS_NOTHING(auth.initialize());
     TS_ASSERT_THROWS(auth.setPropertyValue("usernam", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(auth.setPropertyValue("sername", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(auth.setPropertyValue("Passwo", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/AuthenticateTest.h b/Framework/RemoteAlgorithms/test/AuthenticateTest.h
index d317c10560ef6fdeaf516bbb0cfd485e081759e9..f3ec5bc35caebaecaed0b036d8cbd39213469ee7 100644
--- a/Framework/RemoteAlgorithms/test/AuthenticateTest.h
+++ b/Framework/RemoteAlgorithms/test/AuthenticateTest.h
@@ -63,9 +63,9 @@ public:
     // password missing
     TS_ASSERT_THROWS_NOTHING(alg1.setPropertyValue("UserName", "john_missing"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     Authenticate alg2;
@@ -73,9 +73,9 @@ public:
     // username missing
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("Password", "LogIn"));
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     Authenticate alg3;
@@ -84,7 +84,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("UserName", "john_missing"));
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("Password", "LogIn"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -92,11 +92,11 @@ public:
     Authenticate auth;
     TS_ASSERT_THROWS_NOTHING(auth.initialize());
     TS_ASSERT_THROWS(auth.setPropertyValue("usernam", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(auth.setPropertyValue("sername", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(auth.setPropertyValue("Passwo", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h
index ff7e6a72de05e444de251f3c05fe52254d02f6b4..1c1adf0ddf7d267a73ab2e2b5a4c75171924c10e 100644
--- a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h
+++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h
@@ -65,21 +65,21 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // Transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("RemoteFileName", "file name"));
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     DownloadRemoteFile2 alg2;
     TS_ASSERT_THROWS_NOTHING(alg2.initialize());
     // file name missing
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     DownloadRemoteFile2 alg3;
@@ -89,7 +89,7 @@ public:
         alg3.setPropertyValue("RemoteFileName", "file name"));
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -97,11 +97,11 @@ public:
     DownloadRemoteFile2 dl;
     TS_ASSERT_THROWS_NOTHING(dl.initialize();)
     TS_ASSERT_THROWS(dl.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(dl.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(dl.setPropertyValue("FileName", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h
index df257dd891c91c2cb2101cf75af1efb643fd78cc..8dddb2d8c802d272b8ab2f124c9f45eff56f5693 100644
--- a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h
+++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h
@@ -65,21 +65,21 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // Transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("RemoteFileName", "file name"));
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     DownloadRemoteFile alg2;
     TS_ASSERT_THROWS_NOTHING(alg2.initialize());
     // file name missing
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     DownloadRemoteFile alg3;
@@ -89,7 +89,7 @@ public:
         alg3.setPropertyValue("RemoteFileName", "file name"));
     TS_ASSERT_THROWS_NOTHING(alg3.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
   }
 
@@ -97,11 +97,11 @@ public:
     DownloadRemoteFile dl;
     TS_ASSERT_THROWS_NOTHING(dl.initialize();)
     TS_ASSERT_THROWS(dl.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(dl.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(dl.setPropertyValue("FileName", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/Logout2Test.h b/Framework/RemoteAlgorithms/test/Logout2Test.h
index 4450d87d0e3c5be09f58299f923f4fa335ed0d63..3d5a0f2ad3fc8740e9a1f9914c123c9ebb158394 100644
--- a/Framework/RemoteAlgorithms/test/Logout2Test.h
+++ b/Framework/RemoteAlgorithms/test/Logout2Test.h
@@ -58,9 +58,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(lo.initialize());
     // username missing
     TS_ASSERT_THROWS(lo.setPropertyValue("ComputeResource", "anything"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(lo.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(lo.execute(), const std::runtime_error &);
     TS_ASSERT(!lo.isExecuted());
   }
 
@@ -68,7 +68,7 @@ public:
     Logout2 lo;
     TS_ASSERT_THROWS_NOTHING(lo.initialize());
     TS_ASSERT_THROWS(lo.setPropertyValue("usernam", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_runOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h
index f34042415edeb3963a61a1665a9a07d5743a9de9..10c105ae88dcf1976b5ff25f9070352316544544 100644
--- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h
+++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h
@@ -66,7 +66,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(qar.setPropertyValue("JobID", "john_missing"));
 
-    TS_ASSERT_THROWS(qar.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(qar.execute(), const std::runtime_error &);
     TS_ASSERT(!qar.isExecuted());
   }
 
@@ -74,11 +74,11 @@ public:
     QueryAllRemoteJobs2 qar;
     TS_ASSERT_THROWS_NOTHING(qar.initialize();)
     TS_ASSERT_THROWS(qar.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qar.setPropertyValue("TransactionID", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qar.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h
index 10ffb61fc81bf5093508f5bdaa405317fe12be94..dd2d09dd9163a30d63d5945a71795ae30a734a67 100644
--- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h
+++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h
@@ -66,7 +66,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(qar.setPropertyValue("JobID", "john_missing"));
 
-    TS_ASSERT_THROWS(qar.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(qar.execute(), const std::runtime_error &);
     TS_ASSERT(!qar.isExecuted());
   }
 
@@ -74,11 +74,11 @@ public:
     QueryAllRemoteJobs qar;
     TS_ASSERT_THROWS_NOTHING(qar.initialize();)
     TS_ASSERT_THROWS(qar.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qar.setPropertyValue("TransactionID", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qar.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h
index 2bf0ba6575b48949721465a965967b01ff10d406..59d94d1a57177ea715e25b3728a6aad77b86c9d6 100644
--- a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h
+++ b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // Transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     QueryRemoteFile2 alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "trans0001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,11 +84,11 @@ public:
     QueryRemoteFile2 qrf;
     TS_ASSERT_THROWS_NOTHING(qrf.initialize();)
     TS_ASSERT_THROWS(qrf.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qrf.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qrf.setPropertyValue("ComputeResourc", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h
index fd8ed8890501e17a642281224cf3818d191e8df2..a8d99fa7a39284e9975c37a0b3eb9143446eb267 100644
--- a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h
+++ b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // Transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     QueryRemoteFile alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "trans0001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,11 +84,11 @@ public:
     QueryRemoteFile qrf;
     TS_ASSERT_THROWS_NOTHING(qrf.initialize();)
     TS_ASSERT_THROWS(qrf.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qrf.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qrf.setPropertyValue("ComputeResourc", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h
index b983bb2c725fd70e94b2d8e4cfbb8047e22d5c74..56af2dae1b0cb9ea711177304993437159794a1f 100644
--- a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h
+++ b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     QueryRemoteJob2 alg2;
@@ -75,7 +75,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("JobID", "missing001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -83,11 +83,11 @@ public:
     QueryRemoteJob2 qr;
     TS_ASSERT_THROWS_NOTHING(qr.initialize();)
     TS_ASSERT_THROWS(qr.setPropertyValue("job", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qr.setPropertyValue("id", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qr.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h
index a19ffdf59dc2b530bd2b0f8ad155a0c37f000f02..b30d9204422b5f83c3795ec743582975d0515455 100644
--- a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h
+++ b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h
@@ -63,9 +63,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     QueryRemoteJob alg2;
@@ -73,7 +73,7 @@ public:
     // compute resource missing
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("JobID", "missing001"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -81,11 +81,11 @@ public:
     QueryRemoteJob qr;
     TS_ASSERT_THROWS_NOTHING(qr.initialize();)
     TS_ASSERT_THROWS(qr.setPropertyValue("job", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qr.setPropertyValue("id", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(qr.setPropertyValue("ComputeRes", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/SimpleJSONTest.h b/Framework/RemoteAlgorithms/test/SimpleJSONTest.h
index e8a3059bb228f47b4feca1b08e555c14b955ead0..2394ecc9ea9eceae316492cdb45bc1ebcd27baf9 100644
--- a/Framework/RemoteAlgorithms/test/SimpleJSONTest.h
+++ b/Framework/RemoteAlgorithms/test/SimpleJSONTest.h
@@ -71,26 +71,26 @@ public:
 
     str = "";
     JSONObject jo;
-    TS_ASSERT_THROWS(initFromStream(jo, input), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(jo["no_param"].getValue(res));
     TS_ASSERT_EQUALS(false, jo["no_param"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
     TS_ASSERT_EQUALS(false, jo["another_no_param"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
 
-    TS_ASSERT_THROWS(initFromStream(jo, input), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(jo["doesnt_exist"].getValue(res));
     TS_ASSERT_EQUALS(false, jo["doesnt_exist"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
 
     str = "{ mistake: }";
-    TS_ASSERT_THROWS(initFromStream(jo, input), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(jo["no no"].getValue(res));
     TS_ASSERT_EQUALS(false, jo["it's not here"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
 
     str = "{ ";
-    TS_ASSERT_THROWS(initFromStream(jo, input), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(jo["no no"].getValue(res));
     TS_ASSERT_EQUALS(false, jo["it's not here"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
@@ -104,7 +104,7 @@ public:
     std::string res;
 
     JSONObject o;
-    TS_ASSERT_THROWS(initFromStream(o, input), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(o, input), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(o["Err_Msg"].getValue(res));
     TS_ASSERT_EQUALS(false, o["Err_Msg"].getValue(res));
     TS_ASSERT_EQUALS(res, "");
@@ -206,7 +206,7 @@ public:
     std::string str = "json failure here";
     std::istringstream istr(str);
     JSONObject jo;
-    TS_ASSERT_THROWS(initFromStream(jo, istr), JSONParseException);
+    TS_ASSERT_THROWS(initFromStream(jo, istr), const JSONParseException &);
     TS_ASSERT_THROWS_NOTHING(prettyPrint(jo, out, 0));
 
     std::string strOK = R"({ "key1": "val1"})";
diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h
index f5308f9acd6475bb473f0b428a63a633425a5ecf..099121ea9bdf7528ce8842a18ebb9cfba0184505 100644
--- a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h
+++ b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     StartRemoteTransaction2 alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,11 +84,11 @@ public:
     StartRemoteTransaction2 start;
     TS_ASSERT_THROWS_NOTHING(start.initialize();)
     TS_ASSERT_THROWS(start.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(start.setPropertyValue("Transaction", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(start.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h
index aef6a27885a3b644eeab94c59b3b882d57095e4f..ef28d1ed2e049cb8bb519558458fef1e107ffde2 100644
--- a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h
+++ b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     StartRemoteTransaction alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,11 +84,11 @@ public:
     StartRemoteTransaction start;
     TS_ASSERT_THROWS_NOTHING(start.initialize();)
     TS_ASSERT_THROWS(start.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(start.setPropertyValue("Transaction", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(start.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h
index 9337e07bf6aaa976fc16d31a7cbefce9f3645dfa..fe32b43e6e7e3c8a52123eaf48e8b2c6b57d41ab 100644
--- a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h
+++ b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     StopRemoteTransaction2 alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,13 +84,13 @@ public:
     StopRemoteTransaction2 stop;
     TS_ASSERT_THROWS_NOTHING(stop.initialize();)
     TS_ASSERT_THROWS(stop.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("Transaction", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("JobID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h
index a844fb8536625047b210a19b088bb5960df7203a..ecd6169e6a9d319a34a0b566ae1cfd4ce774723e 100644
--- a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h
+++ b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h
@@ -65,9 +65,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg1.initialize());
     // transaction id missing
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     StopRemoteTransaction alg2;
@@ -76,7 +76,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("TransactionID", "john_missing"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
   }
 
@@ -84,13 +84,13 @@ public:
     StopRemoteTransaction stop;
     TS_ASSERT_THROWS_NOTHING(stop.initialize();)
     TS_ASSERT_THROWS(stop.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("Transaction", "whatever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("JobID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(stop.setPropertyValue("ID", "whichever"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h
index 0187f050bdcb4345929247f65ab2b068819326e8..573d7fff5f64318befaff13297bb21c4b15c0adb 100644
--- a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h
+++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h
@@ -72,23 +72,23 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("ScriptParams", "print 'hello world'"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     SubmitRemoteJob2 alg2;
     TS_ASSERT_THROWS_NOTHING(alg2.initialize());
     // task name name missing
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("TransactionID", "id001"));
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("ScriptName", "test script"));
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("ScriptParams", "print 'hello world'"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     SubmitRemoteJob2 alg3;
@@ -99,9 +99,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg3.setPropertyValue("ScriptParams", "print 'hello world'"));
     TS_ASSERT_THROWS(alg3.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
 
     SubmitRemoteJob2 alg4;
@@ -114,7 +114,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg4.setPropertyValue("ScriptParams", "print 'hello world'"));
 
-    TS_ASSERT_THROWS(alg4.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg4.execute(), const std::runtime_error &);
     TS_ASSERT(!alg4.isExecuted());
 
     SubmitRemoteJob2 alg5;
@@ -125,9 +125,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg5.setPropertyValue("ScriptName", "test script"));
     TS_ASSERT_THROWS(alg5.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg5.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg5.execute(), const std::runtime_error &);
     TS_ASSERT(!alg5.isExecuted());
   }
 
@@ -135,26 +135,26 @@ public:
     SubmitRemoteJob2 s;
     TS_ASSERT_THROWS_NOTHING(s.initialize();)
     TS_ASSERT_THROWS(s.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("NumNodes", "anything"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("NumNodes", "-3"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("CoresPerNode", "anything"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("Task", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("Name", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("Transaction", "anything"),
-                     std::runtime_error);
-    TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), std::runtime_error);
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("ScriptName", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("Scrip", "any name"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("ScriptParams", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h
index a82e207c935d9e1da86d1777c1ba6062dd31f82a..841537b11fc4add01c23dff5e35ce7510df3385c 100644
--- a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h
+++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h
@@ -72,23 +72,23 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("PythonScript", "print 'hello world'"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     SubmitRemoteJob alg2;
     TS_ASSERT_THROWS_NOTHING(alg2.initialize());
     // task name name missing
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("TransactionID", "id001"));
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("ScriptName", "test script"));
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("PythonScript", "print 'hello world'"));
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     SubmitRemoteJob alg3;
@@ -99,9 +99,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg3.setPropertyValue("PythonScript", "print 'hello world'"));
     TS_ASSERT_THROWS(alg3.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
 
     SubmitRemoteJob alg4;
@@ -114,7 +114,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg4.setPropertyValue("PythonScript", "print 'hello world'"));
 
-    TS_ASSERT_THROWS(alg4.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg4.execute(), const std::runtime_error &);
     TS_ASSERT(!alg4.isExecuted());
 
     SubmitRemoteJob alg5;
@@ -125,9 +125,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg5.setPropertyValue("ScriptName", "test script"));
     TS_ASSERT_THROWS(alg5.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg5.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg5.execute(), const std::runtime_error &);
     TS_ASSERT(!alg5.isExecuted());
   }
 
@@ -135,26 +135,26 @@ public:
     SubmitRemoteJob s;
     TS_ASSERT_THROWS_NOTHING(s.initialize();)
     TS_ASSERT_THROWS(s.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("NumNodes", "anything"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("NumNodes", "-3"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("CoresPerNode", "anything"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("Task", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("Name", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("Transaction", "anything"),
-                     std::runtime_error);
-    TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), std::runtime_error);
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("ScriptName", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(s.setPropertyValue("Scrip", "any name"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(s.setPropertyValue("PythonScript", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h
index 9eb8a14d9bd881b85003ee91086061d78ba2ae40..ee128c52a343d2b62f064ecc965d9dcd9b7743cc 100644
--- a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h
+++ b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h
@@ -69,9 +69,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("LocalFileName", "local file name"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     UploadRemoteFile2 alg2;
@@ -81,9 +81,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("LocalFileName", "local file name"));
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     UploadRemoteFile2 alg3;
@@ -93,9 +93,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg3.setPropertyValue("RemoteFileName", "remote file name"));
     TS_ASSERT_THROWS(alg3.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
 
     UploadRemoteFile2 alg4;
@@ -105,7 +105,7 @@ public:
         alg4.setPropertyValue("RemoteFileName", "file name"));
     TS_ASSERT_THROWS_NOTHING(alg4.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg4.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg4.execute(), const std::runtime_error &);
     TS_ASSERT(!alg4.isExecuted());
   }
 
@@ -113,15 +113,15 @@ public:
     UploadRemoteFile2 ul;
     TS_ASSERT_THROWS_NOTHING(ul.initialize();)
     TS_ASSERT_THROWS(ul.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("RemoteFile", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("FileName", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("LocalFile", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h
index 1295a84f750612f6a97fbb74fd86255c469f959c..62ca78e02ca9c040cea68f7317456329ca82fa5b 100644
--- a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h
+++ b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h
@@ -69,9 +69,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg1.setPropertyValue("LocalFileName", "local file name"));
     TS_ASSERT_THROWS(alg1.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg1.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg1.execute(), const std::runtime_error &);
     TS_ASSERT(!alg1.isExecuted());
 
     UploadRemoteFile alg2;
@@ -81,9 +81,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg2.setPropertyValue("LocalFileName", "local file name"));
     TS_ASSERT_THROWS(alg2.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg2.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg2.execute(), const std::runtime_error &);
     TS_ASSERT(!alg2.isExecuted());
 
     UploadRemoteFile alg3;
@@ -93,9 +93,9 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg3.setPropertyValue("RemoteFileName", "remote file name"));
     TS_ASSERT_THROWS(alg3.setPropertyValue("ComputeResource", "missing!"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
-    TS_ASSERT_THROWS(alg3.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg3.execute(), const std::runtime_error &);
     TS_ASSERT(!alg3.isExecuted());
 
     UploadRemoteFile alg4;
@@ -105,7 +105,7 @@ public:
         alg4.setPropertyValue("RemoteFileName", "file name"));
     TS_ASSERT_THROWS_NOTHING(alg4.setPropertyValue("TransactionID", "id001"));
 
-    TS_ASSERT_THROWS(alg4.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg4.execute(), const std::runtime_error &);
     TS_ASSERT(!alg4.isExecuted());
   }
 
@@ -113,15 +113,15 @@ public:
     UploadRemoteFile ul;
     TS_ASSERT_THROWS_NOTHING(ul.initialize();)
     TS_ASSERT_THROWS(ul.setPropertyValue("Compute", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("TransID", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("RemoteFile", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("FileName", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(ul.setPropertyValue("LocalFile", "anything"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_propertiesOK() {
diff --git a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h
index 9a48e2a6e89a2982c9e5958b7659c86aa3a4240c..2e6ccae27fc6d9a3ba06aa6d50f59a2a942e6e33 100644
--- a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h
+++ b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h
@@ -184,7 +184,7 @@ public:
                           " should fail",
                       IRemoteJobManager_sptr jobManager =
                           RemoteJobManagerFactory::Instance().create(FermiName),
-                      std::runtime_error);
+                      const std::runtime_error &);
 
     // restore facility to what it was before test
     Mantid::Kernel::ConfigService::Instance().setFacility(prevFac.name());
@@ -226,21 +226,21 @@ public:
     // response is empty or inconsistent).
     MockMantidAPIStatusNotFound jm;
     TSM_ASSERT_THROWS("abort job without job ID should throw",
-                      jm.abortRemoteJob(""), JSONParseException);
+                      jm.abortRemoteJob(""), const JSONParseException &);
     TSM_ASSERT_THROWS("abort job with wrong job ID should throw",
-                      jm.abortRemoteJob("anything_wrong"), JSONParseException);
+                      jm.abortRemoteJob("anything_wrong"), const JSONParseException &);
 
     TSM_ASSERT_THROWS("download with wrong transaction ID should throw",
                       jm.downloadRemoteFile("any_wrong_transID", "remote_fname",
                                             "local_fname"),
-                      JSONParseException);
+                      const JSONParseException &);
 
     // Note that as an exception queryAllRemoteJobs does a bit more of
     // checking and throws std::runtime_error when something is wrong
     // in the server response.
     std::vector<IRemoteJobManager::RemoteJobInfo> infos;
     TSM_ASSERT_THROWS("query all jobs without logging in should throw",
-                      infos = jm.queryAllRemoteJobs(), std::runtime_error);
+                      infos = jm.queryAllRemoteJobs(), const std::runtime_error &);
     TSM_ASSERT_EQUALS(
         "there should not be any job information returned from the remote",
         infos.size(), 0);
@@ -248,43 +248,43 @@ public:
     std::vector<std::string> files;
     TSM_ASSERT_THROWS(
         "query remote files with wrong transaction ID should throw",
-        files = jm.queryRemoteFile("any_wrong_transID"), JSONParseException);
+        files = jm.queryRemoteFile("any_wrong_transID"), const JSONParseException &);
     TSM_ASSERT_EQUALS("The file list for a wrong transaction should be empty",
                       files.size(), 0);
 
     IRemoteJobManager::RemoteJobInfo info;
     TSM_ASSERT_THROWS("query job info should throw for wrong job ID",
                       info = jm.queryRemoteJob("any_wrong_jobID"),
-                      JSONParseException);
+                      const JSONParseException &);
 
     std::string id;
     TSM_ASSERT_THROWS("start transaction without logging in should throw",
-                      id = jm.startRemoteTransaction(), JSONParseException);
+                      id = jm.startRemoteTransaction(), const JSONParseException &);
     TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id,
                       "");
 
     TSM_ASSERT_THROWS("stop transaction without logging in should throw",
                       jm.stopRemoteTransaction("a_wrong_transID"),
-                      JSONParseException);
+                      const JSONParseException &);
 
     std::string jobID;
     TSM_ASSERT_THROWS("submit job without logging in should throw",
                       id = jm.submitRemoteJob("a_wrong_transID", "executable",
                                               "--params 0", "name_for_job"),
-                      JSONParseException);
+                      const JSONParseException &);
     TSM_ASSERT_EQUALS("failed submit job should not return any ID", jobID, "");
 
     TSM_ASSERT_THROWS(
         "upload file without logging in should throw",
         jm.uploadRemoteFile("wrong_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
 
     // and failed login at the end
     TSM_ASSERT_THROWS("authenticate with empty credentials should throw",
-                      jm.authenticate("", ""), JSONParseException);
+                      jm.authenticate("", ""), const JSONParseException &);
     TSM_ASSERT_THROWS("mocked authenticate should throw",
                       jm.authenticate("wrong_user", "no_pass"),
-                      JSONParseException);
+                      const JSONParseException &);
   }
 
 private:
@@ -305,24 +305,24 @@ private:
     std::vector<IRemoteJobManager::RemoteJobInfo> infos;
     TSM_ASSERT_THROWS("query all jobs with ok response code but no content "
                       "from server should throw",
-                      infos = jm.queryAllRemoteJobs(), std::runtime_error);
+                      infos = jm.queryAllRemoteJobs(), const std::runtime_error &);
 
     std::vector<std::string> files;
     TSM_ASSERT_THROWS("query remote files with ok response code but no content "
                       "from server should throw",
-                      files = jm.queryRemoteFile("any"), JSONParseException);
+                      files = jm.queryRemoteFile("any"), const JSONParseException &);
     TSM_ASSERT_EQUALS("The file list for a transaction should be empty",
                       files.size(), 0);
 
     IRemoteJobManager::RemoteJobInfo info;
     TSM_ASSERT_THROWS("query job info with ok response code from but no "
                       "content from server should throw",
-                      info = jm.queryRemoteJob("any"), JSONParseException);
+                      info = jm.queryRemoteJob("any"), const JSONParseException &);
 
     std::string id;
     TSM_ASSERT_THROWS("start transaction with ok response code but no content "
                       "from server should throw",
-                      id = jm.startRemoteTransaction(), JSONParseException);
+                      id = jm.startRemoteTransaction(), const JSONParseException &);
     TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id,
                       "");
 
@@ -335,7 +335,7 @@ private:
                       "server should throw",
                       id = jm.submitRemoteJob("a_wrong_transID", "executable",
                                               "--params 0", "name_for_job"),
-                      JSONParseException);
+                      const JSONParseException &);
     TSM_ASSERT_EQUALS("mock submit job should not return non-empty ID", jobID,
                       "");
 
@@ -343,7 +343,7 @@ private:
         "upload file with ok response code but no content from server should "
         "throw",
         jm.uploadRemoteFile("wrong_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
   }
 
   // for when the server returns status != HTTP_OK and a correctly
@@ -351,56 +351,56 @@ private:
   void checkJMWithErrResponse(MantidWebServiceAPIJobManager &jm) {
     TSM_ASSERT_THROWS(
         "abort job with error response code from server should throw",
-        jm.abortRemoteJob("anything"), JSONParseException);
+        jm.abortRemoteJob("anything"), const JSONParseException &);
 
     TSM_ASSERT_THROWS(
         "authenticate with error response code from server should throw",
-        jm.authenticate("any_user", "any_pass"), JSONParseException);
+        jm.authenticate("any_user", "any_pass"), const JSONParseException &);
 
     TSM_ASSERT_THROWS(
         "download with error response code from server should throw",
         jm.downloadRemoteFile("any_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
 
     std::vector<IRemoteJobManager::RemoteJobInfo> infos;
     TSM_ASSERT_THROWS(
         "query all jobs with error response from server should throw",
-        infos = jm.queryAllRemoteJobs(), std::runtime_error);
+        infos = jm.queryAllRemoteJobs(), const std::runtime_error &);
 
     std::vector<std::string> files;
     TSM_ASSERT_THROWS(
         "query remote files with error response code from server should throw",
-        files = jm.queryRemoteFile("any"), JSONParseException);
+        files = jm.queryRemoteFile("any"), const JSONParseException &);
     TSM_ASSERT_EQUALS("The file list for a wrong transaction should be empty",
                       files.size(), 0);
 
     IRemoteJobManager::RemoteJobInfo info;
     TSM_ASSERT_THROWS(
         "query job info with error response from server should throw",
-        info = jm.queryRemoteJob("any"), JSONParseException);
+        info = jm.queryRemoteJob("any"), const JSONParseException &);
 
     std::string id;
     TSM_ASSERT_THROWS(
         "start transaction with error response from server should throw",
-        id = jm.startRemoteTransaction(), JSONParseException);
+        id = jm.startRemoteTransaction(), const JSONParseException &);
     TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id,
                       "");
 
     TSM_ASSERT_THROWS(
         "stop transaction with error response from server should throw",
-        jm.stopRemoteTransaction("a_wrong_transID"), JSONParseException);
+        jm.stopRemoteTransaction("a_wrong_transID"), const JSONParseException &);
 
     std::string jobID;
     TSM_ASSERT_THROWS("submit job with error response from server should throw",
                       id = jm.submitRemoteJob("a_wrong_transID", "executable",
                                               "--params 0", "name_for_job"),
-                      JSONParseException);
+                      const JSONParseException &);
     TSM_ASSERT_EQUALS("failed submit job should not return any ID", jobID, "");
 
     TSM_ASSERT_THROWS(
         "upload file with error response from server should throw",
         jm.uploadRemoteFile("wrong_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
   }
 
   // for when the server returns an status code != HTTP_OK but the
@@ -409,61 +409,61 @@ private:
   void checkJMErrWithoutErrMessage(MantidWebServiceAPIJobManager &jm) {
     TSM_ASSERT_THROWS("abort job with error response code but no content from "
                       "server should throw",
-                      jm.abortRemoteJob("anything"), JSONParseException);
+                      jm.abortRemoteJob("anything"), const JSONParseException &);
 
     TSM_ASSERT_THROWS(
         "authenticate with error response code but no content from server but "
         "no content should throw",
-        jm.authenticate("any_user", "any_pass"), JSONParseException);
+        jm.authenticate("any_user", "any_pass"), const JSONParseException &);
 
     TSM_ASSERT_THROWS(
         "download with error response code but no content from server should "
         "throw",
         jm.downloadRemoteFile("any_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
 
     std::vector<IRemoteJobManager::RemoteJobInfo> infos;
     TSM_ASSERT_THROWS("query all jobs with error response from but no content "
                       "server should throw",
-                      infos = jm.queryAllRemoteJobs(), std::runtime_error);
+                      infos = jm.queryAllRemoteJobs(), const std::runtime_error &);
 
     std::vector<std::string> files;
     TSM_ASSERT_THROWS("query remote files with error response code but no "
                       "content from server should throw",
-                      files = jm.queryRemoteFile("any"), JSONParseException);
+                      files = jm.queryRemoteFile("any"), const JSONParseException &);
     TSM_ASSERT_EQUALS("The file list for a wrong transaction should be empty",
                       files.size(), 0);
 
     IRemoteJobManager::RemoteJobInfo info;
     TSM_ASSERT_THROWS("query job info with error response but no content from "
                       "server should throw",
-                      info = jm.queryRemoteJob("any"), JSONParseException);
+                      info = jm.queryRemoteJob("any"), const JSONParseException &);
 
     std::string id;
     TSM_ASSERT_THROWS("start transaction with error response but no content "
                       "from server should throw",
-                      id = jm.startRemoteTransaction(), JSONParseException);
+                      id = jm.startRemoteTransaction(), const JSONParseException &);
     TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id,
                       "");
 
     TSM_ASSERT_THROWS("stop transaction with error response but no content "
                       "from server should throw",
                       jm.stopRemoteTransaction("a_wrong_transID"),
-                      JSONParseException);
+                      const JSONParseException &);
 
     std::string jobID;
     TSM_ASSERT_THROWS("submit job with error response but no content from "
                       "server should throw",
                       id = jm.submitRemoteJob("a_wrong_transID", "executable",
                                               "--params 0", "name_for_job"),
-                      JSONParseException);
+                      const JSONParseException &);
     TSM_ASSERT_EQUALS("failed submit job should not return any ID", jobID, "");
 
     TSM_ASSERT_THROWS(
         "upload file with error response but no content from server should "
         "throw",
         jm.uploadRemoteFile("wrong_transID", "remote_fname", "local_fname"),
-        JSONParseException);
+        const JSONParseException &);
   }
 
   static const std::string SNSFac;
diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp
index 45de06c905f67f24474746b821f84026d8925f16..82238841208a0396235fa587f8850a2bbacf28bd 100644
--- a/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp
+++ b/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp
@@ -32,7 +32,7 @@ void PoldiBasicChopper::loadConfiguration(
   std::vector<double> slitPositions(numberOfSlits);
   for (size_t i = 0; i < numberOfSlits; ++i) {
     slitPositions[i] =
-        chopperGroup->getChild(static_cast<const int>(i))->getPos().X();
+        chopperGroup->getChild(static_cast<int>(i))->getPos().X();
   }
 
   double distance = chopperGroup->getPos().norm() * 1000.0;
diff --git a/Framework/SINQ/test/MillerIndicesIOTest.h b/Framework/SINQ/test/MillerIndicesIOTest.h
index bb3af443eb06e0263a236fabb0a4a310ea603052..02b20c20382faf47e6e6b957c46e7dfacd4d8c02 100644
--- a/Framework/SINQ/test/MillerIndicesIOTest.h
+++ b/Framework/SINQ/test/MillerIndicesIOTest.h
@@ -39,15 +39,15 @@ public:
 
     std::string hklInvalidStringLong("1 3 4 2");
     TS_ASSERT_THROWS(MillerIndicesIO::fromString(hklInvalidStringLong),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     std::string hklInvalidStringShort("2 3");
     TS_ASSERT_THROWS(MillerIndicesIO::fromString(hklInvalidStringShort),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     std::string hklInvalidStringGarbage("q43tn rufninc");
     TS_ASSERT_THROWS(MillerIndicesIO::fromString(hklInvalidStringGarbage),
-                     boost::bad_lexical_cast);
+                     const boost::bad_lexical_cast &);
   }
 
   void testComplementarity() {
diff --git a/Framework/SINQ/test/MillerIndicesTest.h b/Framework/SINQ/test/MillerIndicesTest.h
index e6d9d73ec883b21767c3430f0909950f89b9d61a..de277df69a294c22279ac96e502d4efcc393869a 100644
--- a/Framework/SINQ/test/MillerIndicesTest.h
+++ b/Framework/SINQ/test/MillerIndicesTest.h
@@ -43,7 +43,7 @@ public:
 
     hkl.push_back(3);
 
-    TS_ASSERT_THROWS(MillerIndices fails(hkl), std::runtime_error);
+    TS_ASSERT_THROWS(MillerIndices fails(hkl), const std::runtime_error &);
   }
 
   void testdirectAccess() {
@@ -61,8 +61,8 @@ public:
     TS_ASSERT_EQUALS(hkl[1], 1);
     TS_ASSERT_EQUALS(hkl[2], 0);
 
-    TS_ASSERT_THROWS(hkl[-2], std::range_error);
-    TS_ASSERT_THROWS(hkl[3], std::range_error);
+    TS_ASSERT_THROWS(hkl[-2], const std::range_error &);
+    TS_ASSERT_THROWS(hkl[3], const std::range_error &);
   }
 
   void testvectorAccess() {
diff --git a/Framework/SINQ/test/Poldi2DFunctionTest.h b/Framework/SINQ/test/Poldi2DFunctionTest.h
index b3f033bf8ad8c21b4ca95bd9beb4f9dad418357c..89e280e66a74fa0025569aca63e5e4f6cb1e68c6 100644
--- a/Framework/SINQ/test/Poldi2DFunctionTest.h
+++ b/Framework/SINQ/test/Poldi2DFunctionTest.h
@@ -82,7 +82,7 @@ public:
     function2D->function(domain, values);
 
     for (size_t i = 0; i < values.size(); ++i) {
-      TS_ASSERT_THROWS(values.getFitWeight(i), std::runtime_error);
+      TS_ASSERT_THROWS(values.getFitWeight(i), const std::runtime_error &);
     }
 
     function2D->iterationFinished();
diff --git a/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h b/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h
index 56f6867b07d56078d009382584361e936406954b..459fcbfa91160a08c7178714246dceb8eae7c5f2 100644
--- a/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h
+++ b/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h
@@ -203,9 +203,9 @@ public:
     TS_ASSERT_EQUALS(autoCorrelationCore.getElementFromIndex(3), 40);
 
     TS_ASSERT_THROWS(autoCorrelationCore.getElementFromIndex(10),
-                     std::range_error);
+                     const std::range_error &);
     TS_ASSERT_THROWS(autoCorrelationCore.getElementFromIndex(-10),
-                     std::range_error);
+                     const std::range_error &);
   }
 
   void testgetTofFromIndex() {
@@ -218,9 +218,10 @@ public:
     TS_ASSERT_EQUALS(autoCorrelationCore.getTofFromIndex(0), 345.0);
     TS_ASSERT_EQUALS(autoCorrelationCore.getTofFromIndex(3), 65765.2);
 
-    TS_ASSERT_THROWS(autoCorrelationCore.getTofFromIndex(10), std::range_error);
+    TS_ASSERT_THROWS(autoCorrelationCore.getTofFromIndex(10),
+                     const std::range_error &);
     TS_ASSERT_THROWS(autoCorrelationCore.getTofFromIndex(-10),
-                     std::range_error);
+                     const std::range_error &);
   }
 
   void testgetCounts() {
diff --git a/Framework/SINQ/test/PoldiConversionsTest.h b/Framework/SINQ/test/PoldiConversionsTest.h
index b51808cdc6fdff51145513e96fffc2565899354f..33b603a7a3a052df1372d0c5e2201d84a92eef87 100644
--- a/Framework/SINQ/test/PoldiConversionsTest.h
+++ b/Framework/SINQ/test/PoldiConversionsTest.h
@@ -30,11 +30,16 @@ public:
     TS_ASSERT_DELTA(d, 0.000606307, 1e-9);
     TS_ASSERT_EQUALS(Conversions::dtoTOF(d, distance, sinTheta), tof);
 
-    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 0.0, 2.0), std::domain_error);
-    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, -2.0, 2.0), std::domain_error);
-    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 2.0, 0.0), std::domain_error);
-    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 2.0, -2.0), std::domain_error);
-    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 0.0, 0.0), std::domain_error);
+    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 0.0, 2.0),
+                     const std::domain_error &);
+    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, -2.0, 2.0),
+                     const std::domain_error &);
+    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 2.0, 0.0),
+                     const std::domain_error &);
+    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 2.0, -2.0),
+                     const std::domain_error &);
+    TS_ASSERT_THROWS(Conversions::TOFtoD(1.0, 0.0, 0.0),
+                     const std::domain_error &);
   }
 
   void testDandQConversions() {
@@ -43,8 +48,8 @@ public:
     TS_ASSERT_DELTA(Conversions::dToQ(d), 8.37758040957278196923, 1e-15);
     TS_ASSERT_EQUALS(Conversions::qToD(Conversions::dToQ(0.75)), 0.75);
 
-    TS_ASSERT_THROWS(Conversions::dToQ(0.0), std::domain_error);
-    TS_ASSERT_THROWS(Conversions::qToD(0.0), std::domain_error);
+    TS_ASSERT_THROWS(Conversions::dToQ(0.0), const std::domain_error &);
+    TS_ASSERT_THROWS(Conversions::qToD(0.0), const std::domain_error &);
   }
 
   void testDegAndRadConversions() {
diff --git a/Framework/SINQ/test/PoldiDGridTest.h b/Framework/SINQ/test/PoldiDGridTest.h
index 6a5d1f430522a8217e8d04046716af4254b72168..f35188c841386dde72fbe0a415f605afe00abc7c 100644
--- a/Framework/SINQ/test/PoldiDGridTest.h
+++ b/Framework/SINQ/test/PoldiDGridTest.h
@@ -51,7 +51,7 @@ public:
     TS_ASSERT_EQUALS(grid.m_hasCachedCalculation, false);
     TS_ASSERT_EQUALS(grid.m_deltaD, 0.0);
 
-    TS_ASSERT_THROWS(grid.createGrid(), std::runtime_error);
+    TS_ASSERT_THROWS(grid.createGrid(), const std::runtime_error &);
   }
 
   void testdeltaD() {
diff --git a/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h b/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h
index fa78abaadcc0c1198f3a09e12f3a13a2749c1c3a..fd40630b7acc84c5af9e8b312e35499023e22291 100644
--- a/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h
+++ b/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h
@@ -73,7 +73,7 @@ public:
     PoldiDeadWireDecorator decorator(std::set<int>(), m_detector);
 
     TS_ASSERT_THROWS(decorator.setDeadWires(m_invalidDeadWires),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 };
 
diff --git a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h
index 63f93794dedc7db971ef32084c99f22f1738a290..96f3c6bf692691ae503f94175fed2fbe72e44b9c 100644
--- a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h
+++ b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h
@@ -70,12 +70,12 @@ public:
   void testForwardMethodsInvalidDetector() {
     PoldiDetectorDecorator decorator;
 
-    TS_ASSERT_THROWS(decorator.twoTheta(0), std::runtime_error);
-    TS_ASSERT_THROWS(decorator.distanceFromSample(0), std::runtime_error);
-    TS_ASSERT_THROWS(decorator.elementCount(), std::runtime_error);
-    TS_ASSERT_THROWS(decorator.centralElement(), std::runtime_error);
-    TS_ASSERT_THROWS(decorator.availableElements(), std::runtime_error);
-    TS_ASSERT_THROWS(decorator.qLimits(1.0, 5.0), std::runtime_error);
+    TS_ASSERT_THROWS(decorator.twoTheta(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(decorator.distanceFromSample(0), const std::runtime_error &);
+    TS_ASSERT_THROWS(decorator.elementCount(), const std::runtime_error &);
+    TS_ASSERT_THROWS(decorator.centralElement(), const std::runtime_error &);
+    TS_ASSERT_THROWS(decorator.availableElements(), const std::runtime_error &);
+    TS_ASSERT_THROWS(decorator.qLimits(1.0, 5.0), const std::runtime_error &);
   }
 };
 
diff --git a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h
index 6d1e598fcc3cec06f00be989ee0d178ae30c5c73..67c9b5a17f7a99770c4f3525f1d2281db7890d4d 100644
--- a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h
+++ b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h
@@ -134,13 +134,13 @@ public:
     // Null pointer does not work
     PoldiPeak_sptr nullPeak;
     TS_ASSERT_THROWS(RefinedRange invalid(nullPeak, 2.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // 0 or fewer multiples does not work
     TS_ASSERT_THROWS(RefinedRange invalid(m_testPeak, 0.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(RefinedRange invalid(m_testPeak, -1.0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testRefinedRangeLimitConstructor() {
@@ -148,9 +148,9 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(RefinedRange range(0.0, 1.0, peaks));
     TS_ASSERT_THROWS(RefinedRange invalid(1.0, 0.0, peaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(RefinedRange invalid(1.0, 1.0, peaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     RefinedRange range(3.0, 4.0, peaks);
     TS_ASSERT_EQUALS(range.getXStart(), 3.0);
diff --git a/Framework/SINQ/test/PoldiFitPeaks2DTest.h b/Framework/SINQ/test/PoldiFitPeaks2DTest.h
index 568da0f23a6bcbed19af09706d20891a6ff8adbb..deed493624e89c8347e93ecbb842802f6e135457 100644
--- a/Framework/SINQ/test/PoldiFitPeaks2DTest.h
+++ b/Framework/SINQ/test/PoldiFitPeaks2DTest.h
@@ -63,8 +63,8 @@ public:
     TS_ASSERT_THROWS_NOTHING(spectrumCalculator.setDeltaT(2.0));
     TS_ASSERT_EQUALS(spectrumCalculator.m_deltaT, 2.0);
 
-    TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(0.0), std::invalid_argument);
-    TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(-1.0), std::invalid_argument);
+    TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(0.0), const std::invalid_argument &);
+    TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(-1.0), const std::invalid_argument &);
   }
 
   void testSetDeltaTFromWorkspace() {
@@ -77,7 +77,7 @@ public:
     MatrixWorkspace_sptr invalidWs =
         WorkspaceCreationHelper::create2DWorkspace123(1, 1);
     TS_ASSERT_THROWS(spectrumCalculator.setDeltaTFromWorkspace(invalidWs),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testIsValidDeltaT() {
@@ -107,12 +107,12 @@ public:
     spectrumCalculator.initialize();
     // deltaT is not set, so this must fail
     TS_ASSERT_THROWS(spectrumCalculator.getIntegratedPeakCollection(testPeaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     spectrumCalculator.setDeltaT(3.0);
 
     // still fails, because time transformer is required.
     TS_ASSERT_THROWS(spectrumCalculator.getIntegratedPeakCollection(testPeaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     spectrumCalculator.setTimeTransformer(m_timeTransformer);
 
     // peak collection with some peaks, intensities are described by maximum,
@@ -168,7 +168,7 @@ public:
     PoldiPeakCollection_sptr invalidPeakCollection;
     TS_ASSERT_THROWS(
         spectrumCalculator.getIntegratedPeakCollection(invalidPeakCollection),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testGetNormalizedPeakCollection() {
@@ -178,14 +178,14 @@ public:
     PoldiPeakCollection_sptr invalidPeakCollection;
     TS_ASSERT_THROWS(
         spectrumCalculator.getNormalizedPeakCollection(invalidPeakCollection),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // m_timeTransformer has not been assigned, so even a "good" PeakCollection
     // will throw
     PoldiPeakCollection_sptr testPeaks =
         PoldiPeakCollectionHelpers::createPoldiPeakCollectionMaximum();
     TS_ASSERT_THROWS(spectrumCalculator.getNormalizedPeakCollection(testPeaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     spectrumCalculator.setTimeTransformer(m_timeTransformer);
 
@@ -210,14 +210,14 @@ public:
     PoldiPeakCollection_sptr invalidPeakCollection;
     TS_ASSERT_THROWS(
         spectrumCalculator.getCountPeakCollection(invalidPeakCollection),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // m_timeTransformer has not been assigned, so even a "good" PeakCollection
     // will throw
     PoldiPeakCollection_sptr testPeaks =
         PoldiPeakCollectionHelpers::createPoldiPeakCollectionNormalized();
     TS_ASSERT_THROWS(spectrumCalculator.getCountPeakCollection(testPeaks),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     spectrumCalculator.setTimeTransformer(m_timeTransformer);
 
@@ -361,11 +361,11 @@ public:
     TestablePoldiFitPeaks2D spectrumCalculator;
 
     TS_ASSERT_THROWS(spectrumCalculator.assignMillerIndices(from, invalid),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(spectrumCalculator.assignMillerIndices(invalid, from),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(spectrumCalculator.assignMillerIndices(invalid, invalid),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     TS_ASSERT_DIFFERS(peak1->hkl(), peak2->hkl());
 
@@ -375,7 +375,7 @@ public:
     to->addPeak(peak1);
 
     TS_ASSERT_THROWS(spectrumCalculator.assignMillerIndices(from, to),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testAddBackgroundFunctions() {
@@ -473,7 +473,7 @@ public:
 
     PointGroup_sptr invalid;
     TS_ASSERT_THROWS(alg.getLatticeSystemFromPointGroup(invalid),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h
index b286beca74bad5d30461c31899877ef9aab8005e..38778141b928b45d6eff1c4182435ad38512f46a 100644
--- a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h
+++ b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h
@@ -160,7 +160,7 @@ public:
     TS_ASSERT_EQUALS(alg.m_indexedPeaks.size(), 0);
 
     TS_ASSERT_THROWS(alg.initializeIndexedPeaks(expectedPeaks),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     PoldiPeakCollection_sptr peaks =
         PoldiPeakCollectionHelpers::createPoldiPeakCollectionMaximum();
@@ -249,7 +249,7 @@ public:
         WorkspaceCreationHelper::create1DWorkspaceRand(10, true));
 
     TS_ASSERT_THROWS(alg.getPeakCollections(badWorkspaces),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testReshapeVector() {
@@ -260,13 +260,14 @@ public:
     std::vector<double> empty;
 
     TestablePoldiIndexKnownCompounds alg;
-    TS_ASSERT_THROWS(alg.reshapeVector(empty, 1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.reshapeVector(empty, 1),
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(alg.reshapeVector(one, 1));
     TS_ASSERT_THROWS_NOTHING(alg.reshapeVector(one, 2));
     TS_ASSERT_THROWS_NOTHING(alg.reshapeVector(two, 1));
     TS_ASSERT_THROWS_NOTHING(alg.reshapeVector(two, 2));
     TS_ASSERT_THROWS_NOTHING(alg.reshapeVector(two, 3));
-    TS_ASSERT_THROWS(alg.reshapeVector(one, 0), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.reshapeVector(one, 0), const std::invalid_argument &);
 
     std::vector<double> t11 = alg.reshapeVector(one, 1);
     TS_ASSERT_EQUALS(t11.size(), 1);
@@ -298,7 +299,7 @@ public:
     alg.initialize();
 
     alg.setPropertyValue("Tolerances", "");
-    TS_ASSERT_THROWS(alg.getTolerances(1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.getTolerances(1), const std::invalid_argument &);
 
     alg.setPropertyValue("Tolerances", "0.1");
     TS_ASSERT_THROWS_NOTHING(alg.getTolerances(1));
@@ -309,7 +310,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.getTolerances(2));
     TS_ASSERT_THROWS_NOTHING(alg.getTolerances(3));
 
-    TS_ASSERT_THROWS(alg.getTolerances(0), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.getTolerances(0), const std::invalid_argument &);
   }
 
   void testGetContributions() {
@@ -317,7 +318,7 @@ public:
     alg.initialize();
 
     alg.setPropertyValue("ScatteringContributions", "");
-    TS_ASSERT_THROWS(alg.getContributions(1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.getContributions(1), const std::invalid_argument &);
 
     alg.setPropertyValue("ScatteringContributions", "0.1");
     TS_ASSERT_THROWS_NOTHING(alg.getContributions(1));
@@ -328,7 +329,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.getContributions(2));
     TS_ASSERT_THROWS_NOTHING(alg.getContributions(3));
 
-    TS_ASSERT_THROWS(alg.getContributions(0), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.getContributions(0), const std::invalid_argument &);
   }
 
   void testGetNormalizedContributions() {
@@ -347,11 +348,11 @@ public:
 
     std::vector<double> empty;
     TS_ASSERT_THROWS(alg.getNormalizedContributions(empty),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     std::vector<double> negative(1, -2.0);
     TS_ASSERT_THROWS(alg.getNormalizedContributions(negative),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testScaleIntensityEstimates() {
@@ -360,7 +361,7 @@ public:
 
     PoldiPeakCollection_sptr null;
     TS_ASSERT_THROWS(alg.scaleIntensityEstimates(null, 0.1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     PoldiPeakCollection_sptr indexedSilicon =
         PoldiPeakCollectionHelpers::createTheoreticalPeakCollectionSilicon();
@@ -382,7 +383,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.scaleIntensityEstimates(phases, goodContributions));
     TS_ASSERT_THROWS(alg.scaleIntensityEstimates(phases, badContributions),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testFwhmSigmaConversion() {
@@ -402,7 +403,8 @@ public:
     alg.initialize();
 
     PoldiPeakCollection_sptr null;
-    TS_ASSERT_THROWS(alg.assignFwhmEstimates(null, 0.1), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.assignFwhmEstimates(null, 0.1),
+                     const std::invalid_argument &);
 
     PoldiPeakCollection_sptr indexedSilicon =
         PoldiPeakCollectionHelpers::createTheoreticalPeakCollectionSilicon();
@@ -420,7 +422,7 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(alg.assignFwhmEstimates(phases, goodFwhms));
     TS_ASSERT_THROWS(alg.scaleIntensityEstimates(phases, badFwhms),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testInPeakSet() {
@@ -466,8 +468,10 @@ public:
 
     // throw if one of the peaks is invalid
     PoldiPeak_sptr null;
-    TS_ASSERT_THROWS(alg.isCandidate(null, candidate1), std::invalid_argument);
-    TS_ASSERT_THROWS(alg.isCandidate(peak, null), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.isCandidate(null, candidate1),
+                     const std::invalid_argument &);
+    TS_ASSERT_THROWS(alg.isCandidate(peak, null),
+                     const std::invalid_argument &);
   }
 
   void testGetIndexCandidatePairs() {
@@ -524,7 +528,7 @@ public:
      * is thrown.
      */
     TS_ASSERT_THROWS(alg.getAllIndexCandidatePairs(measuredSi, theoreticalSi),
-                     std::runtime_error);
+                     const std::runtime_error &);
 
     // After initialization, everything is fine.
     alg.initializeUnindexedPeaks();
@@ -537,7 +541,8 @@ public:
     TestablePoldiIndexKnownCompounds alg;
 
     PoldiPeak_sptr peak = PoldiPeak::create(1.0);
-    TS_ASSERT_THROWS(alg.collectUnindexedPeak(peak), std::runtime_error);
+    TS_ASSERT_THROWS(alg.collectUnindexedPeak(peak),
+                     const std::runtime_error &);
 
     alg.initializeUnindexedPeaks();
 
@@ -571,12 +576,14 @@ public:
                         PoldiPeak::Relative);
 
     // Null peaks don't work
-    TS_ASSERT_THROWS(IndexCandidatePair(peak, null, 0), std::invalid_argument);
+    TS_ASSERT_THROWS(IndexCandidatePair(peak, null, 0),
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(IndexCandidatePair(null, candidate1, 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // Range error when no fwhm is set (division by zero).
-    TS_ASSERT_THROWS(IndexCandidatePair(peak, noFwhm, 0), std::range_error);
+    TS_ASSERT_THROWS(IndexCandidatePair(peak, noFwhm, 0),
+                     const std::range_error &);
 
     IndexCandidatePair peakCandidate1(peak, candidate1, 1);
     TS_ASSERT_EQUALS(peakCandidate1.observed, peak);
diff --git a/Framework/SINQ/test/PoldiInstrumentAdapterTest.h b/Framework/SINQ/test/PoldiInstrumentAdapterTest.h
index c73c812baaf0b209a4f945729e6ebf8d0d99bfa9..8c1e37cd0a195a6ebfd885fff44f8efd2fc6c159 100644
--- a/Framework/SINQ/test/PoldiInstrumentAdapterTest.h
+++ b/Framework/SINQ/test/PoldiInstrumentAdapterTest.h
@@ -70,7 +70,7 @@ public:
         new VectorDoubleValueExtractor);
     TS_ASSERT_THROWS(
         (*extractorBad)(const_cast<const Run &>(m_run), "chopperspeed_double"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // check that the value comes out correctly
     TS_ASSERT_EQUALS(
@@ -91,7 +91,7 @@ public:
         new VectorDoubleValueExtractor);
     TS_ASSERT_THROWS(
         (*extractorBad)(const_cast<const Run &>(m_run), "chopperspeed_double"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // check that the value comes out correctly
     TS_ASSERT_EQUALS((*extractorGood)(const_cast<const Run &>(m_run),
@@ -110,7 +110,7 @@ public:
         new NumberDoubleValueExtractor);
     TS_ASSERT_THROWS(
         (*extractorBad)(const_cast<const Run &>(m_run), "chopperspeed_vector"),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // check that the value comes out correctly
     TS_ASSERT_EQUALS(
@@ -138,13 +138,13 @@ public:
     // Throws, because "chopperspeed" is missing
     TS_ASSERT_THROWS(
         instrumentAdapter.extractPropertyFromRun(m_run, "DOESNOTEXIST"),
-        std::runtime_error);
+        const std::runtime_error &);
 
     // Throws, because there is no extractor for supplied type
     const std::string propertyName = getChopperSpeedPropertyName();
     TS_ASSERT_THROWS(
         instrumentAdapter.extractPropertyFromRun(m_stringRun, propertyName),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // Should be ok.
     TS_ASSERT_THROWS_NOTHING(
@@ -161,7 +161,7 @@ public:
     // caught in the method
     TS_ASSERT_THROWS(
         instrumentAdapter.chopperSpeedMatchesTarget(m_stringRun, 10000.0),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // If the property is not present, it is an old file and there can't be any
     // comparison, so it's always true
@@ -202,7 +202,7 @@ public:
 
     // Throw on null-pointer
     TS_ASSERT_THROWS(instrumentAdapter.getExtractorForProperty(nullptr),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS_NOTHING(instrumentAdapter.getExtractorForProperty(
         m_run.getProperty("chopperspeed_double")));
 
diff --git a/Framework/SINQ/test/PoldiPeakCollectionTest.h b/Framework/SINQ/test/PoldiPeakCollectionTest.h
index 5eac2c3cc1918e3732d6b5279cae3efae3bfb890..2ed9ec100621aa3477275fdaa1341248f2288c3f 100644
--- a/Framework/SINQ/test/PoldiPeakCollectionTest.h
+++ b/Framework/SINQ/test/PoldiPeakCollectionTest.h
@@ -214,7 +214,8 @@ public:
     TS_ASSERT_DIFFERS(peaks.pointGroup(), m3m);
 
     PointGroup_sptr invalid;
-    TS_ASSERT_THROWS(peaks.setPointGroup(invalid), std::invalid_argument);
+    TS_ASSERT_THROWS(peaks.setPointGroup(invalid),
+                     const std::invalid_argument &);
   }
 
   void testUnitCell() {
@@ -281,8 +282,8 @@ public:
     PoldiPeak_sptr peak = peaks.peak(0);
     TS_ASSERT_EQUALS(peak, newPeak);
 
-    TS_ASSERT_THROWS(peaks.peak(1), std::range_error);
-    TS_ASSERT_THROWS(peaks.peak(-2), std::range_error);
+    TS_ASSERT_THROWS(peaks.peak(1), const std::range_error &);
+    TS_ASSERT_THROWS(peaks.peak(-2), const std::range_error &);
   }
 
   void testPeaksVector() {
@@ -385,7 +386,7 @@ public:
 
     dValues.pop_back();
     TS_ASSERT_THROWS(p.setPeaks(hkls, dValues, fSquared),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/Framework/SINQ/test/PoldiPeakSearchTest.h b/Framework/SINQ/test/PoldiPeakSearchTest.h
index 99c59b4b344150df51195d402068bbbc4fe38186..bc3f289c532bdffe55b9a750b8ac110cad479e0f 100644
--- a/Framework/SINQ/test/PoldiPeakSearchTest.h
+++ b/Framework/SINQ/test/PoldiPeakSearchTest.h
@@ -47,13 +47,13 @@ public:
     input.pop_back();
 
     TS_ASSERT_THROWS(poldiPeakSearch.getNeighborSums(input),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testSetMinimumDistance() {
     TestablePoldiPeakSearch poldiPeakSearch;
 
-    TS_ASSERT_THROWS(poldiPeakSearch.setMinimumDistance(0), std::runtime_error);
+    TS_ASSERT_THROWS(poldiPeakSearch.setMinimumDistance(0), const std::runtime_error &);
 
     poldiPeakSearch.setMinimumDistance(2);
     TS_ASSERT_EQUALS(poldiPeakSearch.m_minimumDistance, 2);
@@ -197,7 +197,7 @@ public:
     std::list<std::vector<double>::const_iterator> tooManyPeaks(40);
     TS_ASSERT_THROWS(poldiPeakSearch.getNumberOfBackgroundPoints(
                          tooManyPeaks, correlationCounts),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testgetMedianFromSortedVector() {
diff --git a/Framework/SINQ/test/PoldiPeakTest.h b/Framework/SINQ/test/PoldiPeakTest.h
index 5eb63c384d507773e52f2511c81b8d98a389f944..9e73ad6ad2162d09ca95e341762f60522315c3d0 100644
--- a/Framework/SINQ/test/PoldiPeakTest.h
+++ b/Framework/SINQ/test/PoldiPeakTest.h
@@ -38,7 +38,7 @@ public:
     TS_ASSERT_EQUALS(peak->fwhm(), 0.0);
     TS_ASSERT_EQUALS(peak->intensity(), 0.0);
 
-    TS_ASSERT_THROWS(PoldiPeak::create(0.0), std::domain_error)
+    TS_ASSERT_THROWS(PoldiPeak::create(0.0), const std::domain_error &)
   }
 
   void testCreateQIntensity() {
@@ -49,7 +49,7 @@ public:
     TS_ASSERT_EQUALS(intensity.error(), 0.0);
     TS_ASSERT_EQUALS(peak->d(), 2.0 * M_PI);
 
-    TS_ASSERT_THROWS(PoldiPeak::create(0.0, 23.0), std::domain_error);
+    TS_ASSERT_THROWS(PoldiPeak::create(0.0, 23.0), const std::domain_error &);
   }
 
   void testQDConversion() {
diff --git a/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h b/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h
index 02309051f0838001d8b52fc6efe58e0917804a63..a1aba0aad461c513f35b4d6384b8adc3a7fecfd9 100644
--- a/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h
+++ b/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h
@@ -127,7 +127,7 @@ public:
     TS_ASSERT_EQUALS(core.calculateAverage(numbers), 3.5);
 
     std::vector<double> empty;
-    TS_ASSERT_THROWS(core.calculateAverage(empty), std::runtime_error);
+    TS_ASSERT_THROWS(core.calculateAverage(empty), const std::runtime_error &);
   }
 
   void testCalculateAverageDeviationFromValue() {
@@ -139,7 +139,7 @@ public:
 
     std::vector<double> empty;
     TS_ASSERT_THROWS(core.calculateAverageDeviationFromValue(empty, 3.5),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/SINQ/test/PoldiSourceSpectrumTest.h b/Framework/SINQ/test/PoldiSourceSpectrumTest.h
index d62593a521e5b622d9145441102c3dbfc2fed591..ba1d9521b7fb8db30665a9b8e0b7e9f839708201 100644
--- a/Framework/SINQ/test/PoldiSourceSpectrumTest.h
+++ b/Framework/SINQ/test/PoldiSourceSpectrumTest.h
@@ -59,7 +59,7 @@ public:
     boost::shared_ptr<const PoldiAbstractFakeInstrument> badInstrument(
         new PoldiInvalidSourceFakeInstrument);
     TS_ASSERT_THROWS(spectrum.getSourceComponent(badInstrument),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testGetSpectrumParameter() {
@@ -75,7 +75,7 @@ public:
 
     ParameterMap_sptr badParameterMap(new PoldiInvalidFakeParameterMap);
     TS_ASSERT_THROWS(spectrum.getSpectrumParameter(source, badParameterMap),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testSetSpectrum() {
@@ -90,7 +90,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(spectrum.setSpectrum(goodParameter));
 
     TS_ASSERT_THROWS(spectrum.setSpectrum(Parameter_sptr()),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h
index 2d0a60b0f1c33235baa09f9863224c6bf1f2238f..e3f06905b41d171feadbad60c98d4fcd674365c4 100644
--- a/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h
+++ b/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h
@@ -214,11 +214,11 @@ public:
       }
     }
 
-    TS_ASSERT_THROWS(localJacobian.set(20, 3, 30.0), std::out_of_range);
-    TS_ASSERT_THROWS(localJacobian.set(10, 4, 30.0), std::out_of_range);
+    TS_ASSERT_THROWS(localJacobian.set(20, 3, 30.0), const std::out_of_range &);
+    TS_ASSERT_THROWS(localJacobian.set(10, 4, 30.0), const std::out_of_range &);
 
-    TS_ASSERT_THROWS(localJacobian.get(20, 3), std::out_of_range);
-    TS_ASSERT_THROWS(localJacobian.get(10, 4), std::out_of_range);
+    TS_ASSERT_THROWS(localJacobian.get(20, 3), const std::out_of_range &);
+    TS_ASSERT_THROWS(localJacobian.get(10, 4), const std::out_of_range &);
   }
 
   void testLocalJacobianRawValues() {
diff --git a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
index a2737e06495958adb1d538ff3ac048729fa4a13c..459b185a49b9c7ab63dcf3e0077dbdc2ffb05b84 100644
--- a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
+++ b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h
@@ -90,9 +90,9 @@ public:
 
     TS_ASSERT_THROWS_NOTHING(fn.setDecoratedFunction("PawleyFunction"));
     TS_ASSERT_THROWS(fn.setDecoratedFunction("Gaussian"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(fn.setDecoratedFunction("CompositeFunction"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_getPawleyFunction() {
diff --git a/Framework/SINQ/test/PoldiTimeTransformerTest.h b/Framework/SINQ/test/PoldiTimeTransformerTest.h
index cab03039d402af98eb59592852bc23ff41989632..26cdae874533c022bc99c4ecbc41ad3fb18ba027 100644
--- a/Framework/SINQ/test/PoldiTimeTransformerTest.h
+++ b/Framework/SINQ/test/PoldiTimeTransformerTest.h
@@ -105,7 +105,7 @@ public:
 
     PoldiInstrumentAdapter_sptr invalid;
     TS_ASSERT_THROWS(transformer.initializeFromPoldiInstrument(invalid),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void TestCalculatedTotalIntensity() {
diff --git a/Framework/SINQ/test/PoldiTruncateDataTest.h b/Framework/SINQ/test/PoldiTruncateDataTest.h
index 9f615a5b0b827096258958f3e0c7cd18c1f045de..881d3998313863747bdc6f7f164b398d632e3651 100644
--- a/Framework/SINQ/test/PoldiTruncateDataTest.h
+++ b/Framework/SINQ/test/PoldiTruncateDataTest.h
@@ -88,14 +88,14 @@ public:
 
     MatrixWorkspace_sptr invalidSpectra;
     TS_ASSERT_THROWS(truncate.setTimeBinWidthFromWorkspace(invalidSpectra),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // matrix workspace with one bin
     MatrixWorkspace_sptr invalidBins =
         WorkspaceCreationHelper::create2DWorkspace123(1, 1);
 
     TS_ASSERT_THROWS(truncate.setTimeBinWidthFromWorkspace(invalidBins),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testCalculateBinCount() {
@@ -103,16 +103,16 @@ public:
     EXPECT_CALL(*chopper, cycleTime()).Times(1).WillRepeatedly(Return(1500.0));
 
     TestablePoldiTruncateData truncate;
-    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), std::invalid_argument);
+    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &);
 
     truncate.setChopper(chopper);
-    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), std::invalid_argument);
+    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &);
 
     truncate.setTimeBinWidth(-10.0);
-    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), std::invalid_argument);
+    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &);
 
     truncate.setTimeBinWidth(0.0);
-    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), std::invalid_argument);
+    TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &);
 
     truncate.setTimeBinWidth(3.0);
 
@@ -135,7 +135,7 @@ public:
 
     // throws, because actual bin count is smaller than calculated bin count
     TS_ASSERT_THROWS(truncate.getMaximumTimeValue(calculatedBinCount),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     truncate.setActualBinCount(500);
     TS_ASSERT_EQUALS(truncate.getMaximumTimeValue(calculatedBinCount),
@@ -154,12 +154,12 @@ public:
 
     // throws, because actual bin count is smaller than calculated bin count
     TS_ASSERT_THROWS(truncate.getMinimumExtraTimeValue(calculatedBinCount),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // still throws - there are no extra bins.
     truncate.setActualBinCount(500);
     TS_ASSERT_THROWS(truncate.getMinimumExtraTimeValue(calculatedBinCount),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // this must work
     truncate.setActualBinCount(550);
@@ -193,7 +193,7 @@ public:
     truncate.setTimeBinWidthFromWorkspace(smallWorkspace);
 
     TS_ASSERT_THROWS(truncate.getCroppedWorkspace(smallWorkspace),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetExtraCountsWorkspace() {
@@ -223,7 +223,7 @@ public:
     truncate.setTimeBinWidthFromWorkspace(smallWorkspace);
 
     TS_ASSERT_THROWS(truncate.getExtraCountsWorkspace(smallWorkspace),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testGetWorkspaceBelowX() {
diff --git a/Framework/SINQ/test/UncertainValueIOTest.h b/Framework/SINQ/test/UncertainValueIOTest.h
index 5a3d7a82563b53205bcbfecbe31ab5585e4964ee..ad698ac0f9d2a85e6420956db90a3e3056bbe869 100644
--- a/Framework/SINQ/test/UncertainValueIOTest.h
+++ b/Framework/SINQ/test/UncertainValueIOTest.h
@@ -49,11 +49,11 @@ public:
 
     std::string invalidOne("asdf");
     TS_ASSERT_THROWS(UncertainValueIO::fromString(invalidOne),
-                     boost::bad_lexical_cast);
+                     const boost::bad_lexical_cast &);
 
     std::string invalidTwo("4.0 +/- 3.0 +/- 1.0");
     TS_ASSERT_THROWS(UncertainValueIO::fromString(invalidTwo),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testComplementarity() {
diff --git a/Framework/SINQ/test/UncertainValueTest.h b/Framework/SINQ/test/UncertainValueTest.h
index a740b45d8c64c36b936193b556179aad81c74f10..03393067565e46c68a5462fcd9db63283575145d 100644
--- a/Framework/SINQ/test/UncertainValueTest.h
+++ b/Framework/SINQ/test/UncertainValueTest.h
@@ -33,7 +33,7 @@ public:
     TS_ASSERT_EQUALS(noError.value(), 2.0);
     TS_ASSERT_EQUALS(noError.error(), 0.0);
 
-    TS_ASSERT_THROWS(UncertainValue(0.0, -3.0), std::domain_error);
+    TS_ASSERT_THROWS(UncertainValue(0.0, -3.0), const std::domain_error &);
   }
 
   void testPlainAddition() {
@@ -61,7 +61,7 @@ public:
     UncertainValue invalid(2.0, 0.0);
 
     TS_ASSERT_THROWS(UncertainValue::valueToErrorRatio(invalid),
-                     std::domain_error);
+                     const std::domain_error &);
   }
 
   void testErrorToValueRatio() {
@@ -73,7 +73,7 @@ public:
 
     UncertainValue invalid(0.0, 2.0);
     TS_ASSERT_THROWS(UncertainValue::errorToValueRatio(invalid),
-                     std::domain_error);
+                     const std::domain_error &);
   }
 
   void testdoubleOperator() {
@@ -108,8 +108,8 @@ public:
     TS_ASSERT_EQUALS(newerValue.value(), 4.0);
     TS_ASSERT_EQUALS(newerValue.error(), 0.8);
 
-    TS_ASSERT_THROWS(newValue / 0.0, std::domain_error);
-    TS_ASSERT_THROWS(2.0 / UncertainValue(0.0), std::domain_error);
+    TS_ASSERT_THROWS(newValue / 0.0, const std::domain_error &);
+    TS_ASSERT_THROWS(2.0 / UncertainValue(0.0), const std::domain_error &);
   }
 
   void testadditionOperator() {
diff --git a/Framework/Types/test/DateAndTimeTest.h b/Framework/Types/test/DateAndTimeTest.h
index ea8e3c075acb9b59af8ed2474fcd40c2750c684b..0714b55f7e85966aaf2f210fe4a7453150ade0ca 100644
--- a/Framework/Types/test/DateAndTimeTest.h
+++ b/Framework/Types/test/DateAndTimeTest.h
@@ -63,11 +63,12 @@ public:
   }
 
   void test_constructor_fails_invalid_string() {
-    TS_ASSERT_THROWS(DateAndTime("invalid time string"), std::invalid_argument);
+    TS_ASSERT_THROWS(DateAndTime("invalid time string"),
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(DateAndTime("1909-01-31  22:59:59"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(DateAndTime("2017-09-27T 07:03:49+00:00"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_limits_on_construction() {
@@ -420,7 +421,7 @@ public:
   void testNotADateTime() {
     boost::posix_time::ptime time(boost::posix_time::not_a_date_time);
     DateAndTime dt(time);
-    TS_ASSERT_THROWS(boost::posix_time::to_tm(time), std::out_of_range);
+    TS_ASSERT_THROWS(boost::posix_time::to_tm(time), const std::out_of_range &);
     TS_ASSERT_THROWS_NOTHING(dt.to_tm());
   }
 
diff --git a/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp b/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp
index 2b2ab6b110cb9dfe0f64ec5a2d30fd30b99ff3be..ca9ac1879e309f97e516a6b7640c74cfa26ccc01 100644
--- a/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp
+++ b/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp
@@ -235,7 +235,7 @@ void DgsConvertToEnergyTransfer::exec() {
 
     monPeak = getei->getProperty("FirstMonitorPeak");
     const specnum_t monIndex =
-        static_cast<const specnum_t>(getei->getProperty("FirstMonitorIndex"));
+        static_cast<specnum_t>(getei->getProperty("FirstMonitorIndex"));
     // Why did the old way get it from the log?
     incidentEnergy = getei->getProperty("IncidentEnergy");
 
diff --git a/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h b/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h
index 15c4eb136223823e8008ef5df90b33594c7548e7..24db7842b0c50a12dad2c4aadda3bf40deae4f5a 100644
--- a/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h
+++ b/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h
@@ -58,7 +58,7 @@ public:
   void testException() {
     AlignAndFocusPowder align_and_focus;
     align_and_focus.initialize();
-    TS_ASSERT_THROWS(align_and_focus.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(align_and_focus.execute(), const std::runtime_error &);
   }
 
   /* Test AlignAndFocusPowder for HRP38692 raw data */
diff --git a/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h b/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h
index 392ca383c9bd8e95e3012b3327d1be3a79b03c72..1c0f57edf4a381875e0853136ba86f129212dde2 100644
--- a/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h
+++ b/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h
@@ -619,7 +619,7 @@ public:
         Mantid::Kernel::make_unique<MuonPairAsymmetryCalculator>(
             inputWSGroup, summed, subtracted, firstIndex, secondIndex);
     MatrixWorkspace_sptr ws;
-    TS_ASSERT_THROWS(ws = calc->calculate(), std::out_of_range);
+    TS_ASSERT_THROWS(ws = calc->calculate(), const std::out_of_range &);
     TS_ASSERT(!ws);
   }
 
diff --git a/Framework/WorkflowAlgorithms/test/MuonProcessTest.h b/Framework/WorkflowAlgorithms/test/MuonProcessTest.h
index ea780af6add71bf017b87b6211f0e82b26df0c07..1874cccf96cc56f83f22869bd3746a7043b937d7 100644
--- a/Framework/WorkflowAlgorithms/test/MuonProcessTest.h
+++ b/Framework/WorkflowAlgorithms/test/MuonProcessTest.h
@@ -413,7 +413,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", output.name()));
 
-    TS_ASSERT_THROWS(alg.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(alg.execute(), const std::invalid_argument &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -424,7 +424,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
     TS_ASSERT(alg.isInitialized());
     TS_ASSERT_THROWS(alg.setProperty("InputWorkspace", emptyWS),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_errorReporting_badWSType() {
@@ -453,7 +453,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", output.name()));
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -484,7 +484,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", output.name()));
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -513,7 +513,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", output.name()));
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
@@ -545,7 +545,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", output.name()));
 
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT(!alg.isExecuted());
   }
 
diff --git a/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h b/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h
index 59a5a6bc52da493c9c34c2af57252dd05fb9199c..cdad69f51bc43db9192b9b0576519f460a9612ff 100644
--- a/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h
+++ b/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h
@@ -97,7 +97,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("InputWorkspace", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_x_column_is_not_allowed() {
@@ -105,7 +105,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("ColumnX", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_param_names_is_not_allowed() {
@@ -113,7 +113,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("ParameterNames", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_empty_output_is_not_allowed() {
@@ -121,7 +121,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(alg.initialize());
 
     TS_ASSERT_THROWS(alg.setPropertyValue("OutputWorkspace", ""),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_property_input() {
diff --git a/Framework/WorkflowAlgorithms/test/StepScanTest.h b/Framework/WorkflowAlgorithms/test/StepScanTest.h
index 7bdffe2ba20983e586bdadfbae16ddd923c6e0e1..83b3f0ef640bd2c00736b9cfb4adead896a7efd3 100644
--- a/Framework/WorkflowAlgorithms/test/StepScanTest.h
+++ b/Framework/WorkflowAlgorithms/test/StepScanTest.h
@@ -68,10 +68,10 @@ public:
     StepScan alg;
     alg.initialize();
     TS_ASSERT(alg.isInitialized());
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(
         alg.setPropertyValue("OutputWorkspace", outWSName));
-    TS_ASSERT_THROWS(alg.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(alg.execute(), const std::runtime_error &);
     TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspace", inputWS));
     TS_ASSERT(alg.execute());
   }
diff --git a/qt/icons/test/IconTest.h b/qt/icons/test/IconTest.h
index 5b6bf71667dfdc0051c92ca178feddf8a201e922..62e04f4604528fd685bfca4c99f5ed6ae7ab14db 100644
--- a/qt/icons/test/IconTest.h
+++ b/qt/icons/test/IconTest.h
@@ -67,7 +67,7 @@ public:
     TS_ASSERT_THROWS(
         MantidQt::Icons::getIcon(
             {QString("mdi.run-fast"), QString("mdi.run-fast")}, options),
-        std::invalid_argument)
+        const std::invalid_argument &)
   }
 
   void testGetFont() {
@@ -79,7 +79,7 @@ public:
 
   void testGetIconThrowsIfIconLibraryIsNotPresent() {
     TS_ASSERT_THROWS(MantidQt::Icons::getIcon(QString("fda.run-fast")),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 };
 
diff --git a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h
index 8dfdb88fd3441ecf0641d87a2765e9d9080bd16f..75d565f6d8e7dd569949e07eb03ed480e89ab0b6 100644
--- a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h
+++ b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h
@@ -39,14 +39,14 @@ public:
     // Arrange
     CompositePeaksPresenterVsi presenter;
     // Assert
-    TS_ASSERT_THROWS(presenter.getPeaksWorkspace(), std::runtime_error);
+    TS_ASSERT_THROWS(presenter.getPeaksWorkspace(), const std::runtime_error &);
   }
 
   void testThatGettingPeaksWorkspaceNameDirectlyIsNotAllowed() {
     // Arrange
     CompositePeaksPresenterVsi presenter;
     // Assert
-    TS_ASSERT_THROWS(presenter.getPeaksWorkspaceName(), std::runtime_error);
+    TS_ASSERT_THROWS(presenter.getPeaksWorkspaceName(), const std::runtime_error &);
   }
 
   void testThatGetListOfNamesOfSubPresenters() {
diff --git a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h
index 4d7e3638235ddb497a785c572a2c44c1dec3533f..f893d107285850c25c4040d3c60e14fa1a22302b 100644
--- a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h
@@ -46,13 +46,13 @@ public:
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       EventNexusLoadingPresenter(
                           Mantid::Kernel::make_unique<MockMDLoadingView>(), ""),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstructWithNullViewThrows() {
     TSM_ASSERT_THROWS("Should throw if a null view is given.",
                       EventNexusLoadingPresenter(nullptr, "some_file"),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruct() {
@@ -123,14 +123,14 @@ public:
     EventNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
     EventNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testExecuteLoadMetadata() {
@@ -139,7 +139,7 @@ public:
     presenter.executeLoadMetadata();
     TSM_ASSERT_THROWS(
         "Should always throw. Algorithm fixed to create 3 dimensions.",
-        presenter.getTimeStepValues(), std::runtime_error);
+        presenter.getTimeStepValues(), const std::runtime_error &);
     TSM_ASSERT_THROWS_NOTHING("Should throw. Execute not yet run.",
                               presenter.hasTDimensionAvailable());
     TSM_ASSERT_THROWS_NOTHING("Should throw. Execute not yet run.",
diff --git a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h
index b93df7e8ebdcd9b6aaafa8e48293e6d595a7fd78..f3d6b0e00f2456a4cfc29487030a53a41ae0c4f4 100644
--- a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h
+++ b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h
@@ -69,14 +69,14 @@ public:
 
     FieldDataToMetadata function;
     TSM_ASSERT_THROWS("Unknown id requested. Should have thrown.",
-                      function.execute(fieldData, "x"), std::runtime_error);
+                      function.execute(fieldData, "x"), const std::runtime_error &);
   }
 
   void testThrowsIfNullFieldData() {
     vtkFieldData *nullFieldData = nullptr;
     FieldDataToMetadata function;
     TSM_ASSERT_THROWS("Should not be able to execute with null field data.",
-                      function.execute(nullFieldData, "x"), std::runtime_error);
+                      function.execute(nullFieldData, "x"), const std::runtime_error &);
   }
 };
 
diff --git a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h
index d3abe385b0f97669f547ad20b34c6c6dd4bffffd..249a430fedaf0a6c041962dc01f98765be26f504 100644
--- a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h
@@ -49,13 +49,13 @@ public:
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       MDEWEventNexusLoadingPresenter(
                           Mantid::Kernel::make_unique<MockMDLoadingView>(), ""),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstructWithNullViewThrows() {
     TSM_ASSERT_THROWS("Should throw if a null view is given.",
                       MDEWEventNexusLoadingPresenter(nullptr, "some_file"),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruct() {
@@ -125,21 +125,21 @@ public:
     MDEWEventNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.hasTDimensionAvailable(), std::runtime_error);
+                      presenter.hasTDimensionAvailable(), const std::runtime_error &);
   }
 
   void testCallGetTDimensionValuesThrows() {
     MDEWEventNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
     MDEWEventNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testGetWorkspaceTypeName() {
diff --git a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
index f54bd3403dc313f0155bb427659ff8304457319d..91e52de80c9944224f057056257c5c23092f025e 100644
--- a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h
@@ -66,7 +66,7 @@ public:
     TSM_ASSERT_THROWS(
         "Should throw with null view.",
         MDEWInMemoryLoadingPresenter(nullptr, new MockWorkspaceProvider, "_"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testConstructWithNullRepositoryThrows() {
@@ -74,7 +74,7 @@ public:
         "Should throw with null repository.",
         MDEWInMemoryLoadingPresenter(
             Mantid::Kernel::make_unique<MockMDLoadingView>(), nullptr, "_"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testConstructWithEmptyWsNameThrows() {
@@ -83,7 +83,7 @@ public:
                       MDEWInMemoryLoadingPresenter(
                           Mantid::Kernel::make_unique<MockMDLoadingView>(),
                           new MockWorkspaceProvider, emptyName),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruction() {
@@ -159,7 +159,7 @@ public:
     // Test that it doesn't work when not setup.
     TSM_ASSERT_THROWS("::executeLoadMetadata is critical to setup, should "
                       "throw if not run first.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
 
     // Test that it does work when setup.
     presenter.executeLoadMetadata();
@@ -224,7 +224,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.hasTDimensionAvailable(), std::runtime_error);
+                      presenter.hasTDimensionAvailable(), const std::runtime_error &);
   }
 
   void testCallGetTDimensionValuesThrows() {
@@ -232,7 +232,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
@@ -240,7 +240,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testGetWorkspaceTypeName() {
diff --git a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
index fbc97236cb87d4b257ea93b9df57e20afc5d0971..11b741abe77a0c1213bf11164a1e39e65e2edcc9 100644
--- a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h
@@ -59,7 +59,7 @@ public:
     TSM_ASSERT_THROWS(
         "Should throw with null view.",
         MDHWInMemoryLoadingPresenter(nullptr, new MockWorkspaceProvider, "_"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testConstructWithNullRepositoryThrows() {
@@ -67,7 +67,7 @@ public:
         "Should throw with null repository.",
         MDHWInMemoryLoadingPresenter(
             Mantid::Kernel::make_unique<MockMDLoadingView>(), nullptr, "_"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void testConstructWithEmptyWsNameThrows() {
@@ -76,7 +76,7 @@ public:
                       MDHWInMemoryLoadingPresenter(
                           Mantid::Kernel::make_unique<MockMDLoadingView>(),
                           new MockWorkspaceProvider, emptyName),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruction() {
@@ -152,7 +152,7 @@ public:
     // Test that it doesn't work when not setup.
     TSM_ASSERT_THROWS("::executeLoadMetadata is critical to setup, should "
                       "throw if not run first.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
 
     // Test that it does work when setup.
     presenter.executeLoadMetadata();
@@ -220,7 +220,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.hasTDimensionAvailable(), std::runtime_error);
+                      presenter.hasTDimensionAvailable(), const std::runtime_error &);
   }
 
   void testCallGetTDimensionValuesThrows() {
@@ -228,7 +228,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
@@ -236,7 +236,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         new MockWorkspaceProvider, "_");
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testGetWorkspaceTypeName() {
diff --git a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h
index f2056e16f8881ee13116a15d50ca6dd5ffe6e496..0f8a87ba8feb434623648797b7824234be0d3553 100644
--- a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h
@@ -108,13 +108,13 @@ public:
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       MDHWNexusLoadingPresenter(
                           Mantid::Kernel::make_unique<MockMDLoadingView>(), ""),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstructWithNullViewThrows() {
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       MDHWNexusLoadingPresenter(nullptr, "some_file"),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruct() {
@@ -253,21 +253,21 @@ public:
     MDHWNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.hasTDimensionAvailable(), std::runtime_error);
+                      presenter.hasTDimensionAvailable(), const std::runtime_error &);
   }
 
   void testCallGetTDimensionValuesThrows() {
     MDHWNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
     MDHWNexusLoadingPresenter presenter(
         Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testGetWorkspaceTypeName() {
diff --git a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h
index 8795aee13daf9c2af90b6aa457b9dae9e267133b..040d0e3b769ea26717b81fd4e06d6f53341e672f 100644
--- a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h
+++ b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h
@@ -21,19 +21,19 @@ public:
   void testGettingPeaksWorkspaceThrows() {
     NullPeaksPresenterVsi presenter;
     TSM_ASSERT_THROWS("Should not implement this method",
-                      presenter.getPeaksWorkspace(), std::runtime_error);
+                      presenter.getPeaksWorkspace(), const std::runtime_error &);
   }
 
   void testGettingUsablePeaksThrows() {
     NullPeaksPresenterVsi presenter;
     TSM_ASSERT_THROWS("Should not implement this method",
-                      presenter.getViewablePeaks(), std::runtime_error);
+                      presenter.getViewablePeaks(), const std::runtime_error &);
   }
 
   void testGettingPeaksWorkspaceNameThrows() {
     NullPeaksPresenterVsi presenter;
     TSM_ASSERT_THROWS("Should not implement this method",
-                      presenter.getViewablePeaks(), std::runtime_error);
+                      presenter.getViewablePeaks(), const std::runtime_error &);
   }
 
   void testGettingPeaksInfoThrows() {
@@ -47,7 +47,7 @@ public:
     TSM_ASSERT_THROWS(
         "Should not implement this method",
         presenter.getPeaksInfo(peaksWorkspace, row, position, radius, coord),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 #endif
diff --git a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h
index 2fe04c9f12c87669d193810b9a981b3648e6ae5f..b7624d840e11419731a10987374f219909cef9d5 100644
--- a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h
+++ b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h
@@ -58,13 +58,13 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>();
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       SQWLoadingPresenter(std::move(view), ""),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstructWithNullViewThrows() {
     TSM_ASSERT_THROWS("Should throw if an empty file string is given.",
                       SQWLoadingPresenter(nullptr, "some_file"),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testConstruct() {
@@ -156,7 +156,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         getSuitableFileNamePath());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.hasTDimensionAvailable(), std::runtime_error);
+                      presenter.hasTDimensionAvailable(), const std::runtime_error &);
   }
 
   void testCallGetTDimensionValuesThrows() {
@@ -164,7 +164,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         getSuitableFileNamePath());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getTimeStepValues(), std::runtime_error);
+                      presenter.getTimeStepValues(), const std::runtime_error &);
   }
 
   void testCallGetGeometryThrows() {
@@ -172,7 +172,7 @@ public:
         Mantid::Kernel::make_unique<MockMDLoadingView>(),
         getSuitableFileNamePath());
     TSM_ASSERT_THROWS("Should throw. Execute not yet run.",
-                      presenter.getGeometryXML(), std::runtime_error);
+                      presenter.getGeometryXML(), const std::runtime_error &);
   }
 
   void testExecuteLoadMetadata() {
diff --git a/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h b/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h
index c9a2fa3d7b9f3445a88b8c64e5b7a7a2e945ad34..c98530656252ce678a0fb5ff06ecfb066a011cd9 100644
--- a/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h
+++ b/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h
@@ -106,14 +106,14 @@ public:
     TSM_ASSERT_THROWS(
         "Range is negative, should throw.",
         TimeToTimeStep::construct(dimensionMin, dimensionMax, nBins),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testUseWithDefaultConstructorThrows() {
     Mantid::VATES::TimeToTimeStep converter;
     TSM_ASSERT_THROWS(
         "Constructing via default constructor should throw when used.",
-        converter(1), std::runtime_error);
+        converter(1), const std::runtime_error &);
   }
 };
 
diff --git a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
index bd4364ccdae5cc70b973be04a75e33f068915de0..72977d73e21e24d4fc597c7a4721acf1ecd837a3 100644
--- a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
+++ b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h
@@ -45,7 +45,7 @@ public:
         new MockImplicitFunction);
     generator.setImplicitFunction(impFunction);
     TSM_ASSERT_THROWS("Cannot generate the xml without the workspace",
-                      generator.createXMLString(), std::runtime_error);
+                      generator.createXMLString(), const std::runtime_error &);
   }
 
   void testNoLocationDoesNotThrow() {
@@ -79,7 +79,7 @@ public:
     generator.setWorkspace(*workspace);
 
     TSM_ASSERT_THROWS("Cannot create the xml without the workspace name",
-                      generator.createXMLString(), std::runtime_error);
+                      generator.createXMLString(), const std::runtime_error &);
   }
 
   void testCreateXMLWithComponents() // Uses individual setters for geometry,
diff --git a/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h b/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h
index 085f9070b7aeade1ce9286d979eb2f7071019756..35c0519102eb5eb89b356a01dc5538670910abe1 100644
--- a/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h
+++ b/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h
@@ -103,7 +103,7 @@ public:
 
     // Assert
     TSM_ASSERT_THROWS("Frustum is not well defined, should throw error",
-                      frustum.toExtents(), std::runtime_error);
+                      frustum.toExtents(), const std::runtime_error &);
   }
 };
 
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
index 5974048c1430a906c1193ad2eb98896035356e06..bb059534c3cfa373aa4fea43fd0c1fdf94a9b95a 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h
@@ -83,7 +83,7 @@ public:
     TSM_ASSERT_THROWS("By default, should throw when successor type is the "
                       "same as the container.",
                       factory.setSuccessor(std::move(uniqueSuccessor)),
-                      std::runtime_error);
+                      const std::runtime_error &);
     TS_ASSERT(testing::Mock::VerifyAndClearExpectations(&factory));
     TS_ASSERT(testing::Mock::VerifyAndClearExpectations(successor));
   }
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h
index a9227c6d770f78c2155360d37febd1fe2579d301..151c1f8ff0eabd9a08845886c8bdd9b33f356c6e 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h
@@ -26,7 +26,7 @@ public:
   void testThrowIfvtkDataSetNull() {
     vtkDataSet *nullArg = nullptr;
     TS_ASSERT_THROWS(vtkDataSetToImplicitFunction temp(nullArg),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testNoImplcitFunction() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
index 2d8cec8ce717e1eb145abbe3330de40336aec279..0085b6f5e9af7910af2eae84cf49b4123252848b 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
@@ -198,7 +198,7 @@ public:
         ADSWorkspaceProvider<Mantid::API::IMDWorkspace>>();
     TS_ASSERT_THROWS(vtkDataSetToNonOrthogonalDataSet temp(
                          dataset, "", std::move(workspaceProvider)),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testThrowsIfWorkspaceNameEmptyAndUsingADSWorkspaceProvider() {
@@ -208,7 +208,7 @@ public:
     TS_ASSERT_THROWS(
         vtkDataSetToNonOrthogonalDataSet temp(dataset.GetPointer(), "",
                                               std::move(workspaceProvider)),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 
   void testThrowIfVtkDatasetWrongType() {
@@ -217,7 +217,7 @@ public:
         ADSWorkspaceProvider<Mantid::API::IMDWorkspace>>();
     vtkDataSetToNonOrthogonalDataSet converter(grid.GetPointer(), "name",
                                                std::move(workspaceProvider));
-    TS_ASSERT_THROWS(converter.execute(), std::runtime_error);
+    TS_ASSERT_THROWS(converter.execute(), const std::runtime_error &);
   }
 
   void testSimpleDataset() {
@@ -240,7 +240,7 @@ public:
         ADSWorkspaceProvider<Mantid::API::IMDWorkspace>>();
     vtkDataSetToNonOrthogonalDataSet converter(ds, wsName,
                                                std::move(workspaceProvider));
-    TS_ASSERT_THROWS(converter.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(converter.execute(), const std::invalid_argument &);
   }
 
   void testThrowsSimpleDatasetNoUB() {
@@ -251,7 +251,7 @@ public:
         ADSWorkspaceProvider<Mantid::API::IMDWorkspace>>();
     vtkDataSetToNonOrthogonalDataSet converter(ds, wsName,
                                                std::move(workspaceProvider));
-    TS_ASSERT_THROWS(converter.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(converter.execute(), const std::invalid_argument &);
   }
 
   void testThrowsSimpleDatasetNoWMatrix() {
@@ -262,7 +262,7 @@ public:
         ADSWorkspaceProvider<Mantid::API::IMDWorkspace>>();
     vtkDataSetToNonOrthogonalDataSet converter(ds, wsName,
                                                std::move(workspaceProvider));
-    TS_ASSERT_THROWS(converter.execute(), std::invalid_argument);
+    TS_ASSERT_THROWS(converter.execute(), const std::invalid_argument &);
   }
 
   void testNoThrowsSimpleDataSetNoAffineMatrix() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
index e919135dd2ce99b66313c662f1ae0e162961f5eb..91cfa87eef449150b4655b7b9f36165a1dca9391 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h
@@ -206,14 +206,14 @@ public:
     vtkUnstructuredGrid *in = nullptr;
     auto out = vtkSmartPointer<vtkUnstructuredGrid>::New();
     TS_ASSERT_THROWS(vtkDataSetToPeaksFilteredDataSet peaksFilter(in, out),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testThrowIfOutputNull() {
     auto in = vtkSmartPointer<vtkUnstructuredGrid>::New();
     vtkUnstructuredGrid *out = nullptr;
     TS_ASSERT_THROWS(vtkDataSetToPeaksFilteredDataSet peaksFilter(in, out),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void testExecThrowIfNoInit() {
@@ -221,7 +221,7 @@ public:
     auto out = vtkSmartPointer<vtkUnstructuredGrid>::New();
     vtkDataSetToPeaksFilteredDataSet peaksFilter(in, out);
     FakeProgressAction updateProgress;
-    TS_ASSERT_THROWS(peaksFilter.execute(updateProgress), std::runtime_error);
+    TS_ASSERT_THROWS(peaksFilter.execute(updateProgress), const std::runtime_error &);
   }
 
   void testExecutionWithSingleSphericalPeakInQSample() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h
index 344fac3c16fa19fc64e06cb7eef1f44e4721de9e..909f33b51b9206722ca3357efd476f6883382b08 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h
@@ -99,7 +99,7 @@ public:
 
     vtkDataSetToScaledDataSet scaler;
 
-    TS_ASSERT_THROWS(scaler.execute(1, 1, 1, in), std::runtime_error);
+    TS_ASSERT_THROWS(scaler.execute(1, 1, 1, in), const std::runtime_error &);
   }
 
   void testExecution() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h
index 43a638a516c0f4604437127d04a2f48b749d21fc..e38c255252efd2791f9a60fcab1dd41bd201718e 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h
@@ -34,7 +34,7 @@ private:
 public:
   void testThrowIfvtkDataSetNull() {
     vtkDataSet *nullArg = nullptr;
-    TS_ASSERT_THROWS(vtkDataSetToWsLocation temp(nullArg), std::runtime_error);
+    TS_ASSERT_THROWS(vtkDataSetToWsLocation temp(nullArg), const std::runtime_error &);
   }
 
   void testExecution() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h
index 9a1d80f7dd4b16958cd4a1ebde2ca7af5d67cf7a..7e12fe871f6cdbaba50c49095f8f3ecd3e1eb5a1 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h
@@ -33,7 +33,7 @@ private:
 public:
   void testThrowIfvtkDataSetNull() {
     vtkDataSet *nullArg = nullptr;
-    TS_ASSERT_THROWS(vtkDataSetToWsName temp(nullArg), std::runtime_error);
+    TS_ASSERT_THROWS(vtkDataSetToWsName temp(nullArg), const std::runtime_error &);
   }
 
   void testExecution() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h
index 54764748141e73b4e4c73f75c5e9c8bebabad691..acdea625b3e0604e097f779f6950a5640a6e9c17 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h
@@ -58,7 +58,7 @@ private:
     vtkMDHexFactory factory(VATES::VolumeNormalization);
     factory.setCheckDimensionality(doCheckDimensionality);
     if (doCheckDimensionality) {
-      TS_ASSERT_THROWS(factory.initialize(binned_ws), std::runtime_error);
+      TS_ASSERT_THROWS(factory.initialize(binned_ws), const std::runtime_error &);
     } else {
       TS_ASSERT_THROWS_NOTHING(factory.initialize(binned_ws));
       vtkSmartPointer<vtkDataSet> product;
@@ -73,7 +73,7 @@ public:
     FakeProgressAction progressUpdater;
     vtkMDHexFactory factory(VATES::VolumeNormalization);
     TSM_ASSERT_THROWS("Have NOT initalized object. Should throw.",
-                      factory.create(progressUpdater), std::runtime_error);
+                      factory.create(progressUpdater), const std::runtime_error &);
   }
 
   void testInitalizeWithNullWorkspaceThrows() {
@@ -82,7 +82,7 @@ public:
     IMDEventWorkspace *ws = nullptr;
     TSM_ASSERT_THROWS("This is a NULL workspace. Should throw.",
                       factory.initialize(Workspace_sptr(ws)),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   void testGetFactoryTypeName() {
@@ -137,14 +137,14 @@ public:
     // factory.SetSuccessor(mockSuccessor); No Successor set.
 
     auto ws = boost::make_shared<Mantid::DataObjects::TableWorkspace>();
-    TS_ASSERT_THROWS(factory.initialize(ws), std::runtime_error);
+    TS_ASSERT_THROWS(factory.initialize(ws), const std::runtime_error &);
   }
 
   void testCreateWithoutInitializeThrows() {
     FakeProgressAction progressUpdater;
     vtkMDHexFactory factory(VATES::VolumeNormalization);
     // initialize not called!
-    TS_ASSERT_THROWS(factory.create(progressUpdater), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdater), const std::runtime_error &);
   }
 
   void test_roundUp_positive_numbers() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h
index e99909c9c393eb46973073c5f719001f258c8cfd..c3f4546dd1a76507e8d305e3a978282f35e5f0b3 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h
@@ -88,7 +88,7 @@ public:
 
     TSM_ASSERT_THROWS(
         "No workspace, so should not be possible to complete initialization.",
-        factory.initialize(ws_sptr), std::invalid_argument);
+        factory.initialize(ws_sptr), const std::invalid_argument &);
   }
 
   void testCreateWithoutInitializeThrows() {
@@ -96,7 +96,7 @@ public:
 
     vtkMDHistoHex4DFactory<TimeStepToTimeStep> factory(
         Mantid::VATES::VolumeNormalization, 1);
-    TS_ASSERT_THROWS(factory.create(progressAction), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressAction), const std::runtime_error &);
   }
 
   void testInitializationDelegates() {
@@ -147,7 +147,7 @@ public:
 
     TSM_ASSERT_THROWS("Should have thrown an execption given that no successor "
                       "was available.",
-                      factory.initialize(ws_sptr), std::runtime_error);
+                      factory.initialize(ws_sptr), const std::runtime_error &);
   }
 
   void testCreateDelegates() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h
index dc1901fc69ddf472bb74203d76143363ffa980b8..1224ac1d6818307c5f2285581a8ce2bd883bbf6b 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h
@@ -85,13 +85,13 @@ public:
 
     TSM_ASSERT_THROWS(
         "No workspace, so should not be possible to complete initialization.",
-        factory.initialize(ws_sptr), std::invalid_argument);
+        factory.initialize(ws_sptr), const std::invalid_argument &);
   }
 
   void testCreateWithoutInitializeThrows() {
     FakeProgressAction progressUpdate;
     vtkMDHistoHexFactory factory(Mantid::VATES::VolumeNormalization);
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testInitializationDelegates() {
@@ -136,7 +136,7 @@ public:
 
     TSM_ASSERT_THROWS("Should have thrown an execption given that no successor "
                       "was available.",
-                      factory.initialize(ws_sptr), std::runtime_error);
+                      factory.initialize(ws_sptr), const std::runtime_error &);
   }
 
   void testCreateDelegates() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h
index 84061a5e89b4841fc102c9f25cb65465d6434ee5..8a2a2ce20c919c9e396bc2b1b92b1301280c9937 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h
@@ -39,13 +39,13 @@ public:
 
     TSM_ASSERT_THROWS(
         "No workspace, so should not be possible to complete initialization.",
-        factory.initialize(ws_sptr), std::invalid_argument);
+        factory.initialize(ws_sptr), const std::invalid_argument &);
   }
 
   void testCreateWithoutInitializeThrows() {
     FakeProgressAction progressUpdate;
     vtkMDHistoLineFactory factory(Mantid::VATES::VolumeNormalization);
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testProgressUpdates() {
@@ -109,7 +109,7 @@ public:
 
     TSM_ASSERT_THROWS("Should have thrown an execption given that no successor "
                       "was available.",
-                      factory.initialize(ws_sptr), std::runtime_error);
+                      factory.initialize(ws_sptr), const std::runtime_error &);
   }
 
   void testCreateDelegates() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h
index 17ee8d099e4ed83e9422aea31e64baae95a869e6..a687cf9b8d7bc1235a90eff13bcd929be93abc6e 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h
@@ -43,14 +43,14 @@ public:
 
     TSM_ASSERT_THROWS(
         "No workspace, so should not be possible to complete initialization.",
-        factory.initialize(ws_sptr), std::invalid_argument);
+        factory.initialize(ws_sptr), const std::invalid_argument &);
   }
 
   void testCreateWithoutInitializeThrows() {
     FakeProgressAction progressUpdate;
 
     vtkMDHistoQuadFactory factory(Mantid::VATES::VolumeNormalization);
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testInsideThresholds() {
@@ -114,7 +114,7 @@ public:
 
     TSM_ASSERT_THROWS("Should have thrown an execption given that no successor "
                       "was available.",
-                      factory.initialize(ws_sptr), std::runtime_error);
+                      factory.initialize(ws_sptr), const std::runtime_error &);
   }
 
   void testCreateDelegates() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h
index 7296be2401ff7a7070d1e898a6340db2447c3f7f..caf10372884463d7c116b0c2f21a0eb28f571567 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h
@@ -79,7 +79,7 @@ public:
     vtkMDLineFactory factory(Mantid::VATES::VolumeNormalization);
     ITableWorkspace_sptr ws =
         boost::make_shared<Mantid::DataObjects::TableWorkspace>();
-    TS_ASSERT_THROWS(factory.initialize(ws), std::runtime_error);
+    TS_ASSERT_THROWS(factory.initialize(ws), const std::runtime_error &);
   }
 
   void testCreateWithoutInitializeThrows() {
@@ -87,7 +87,7 @@ public:
 
     vtkMDLineFactory factory(Mantid::VATES::VolumeNormalization);
     // initialize not called!
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testCreation() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h
index f6283a78ab360e34de15c5735afdd089430d096d..a24c0154a3b71fdfb46be3b9b602650e3d59cff2 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h
@@ -81,7 +81,7 @@ public:
     vtkMDQuadFactory factory(Mantid::VATES::VolumeNormalization);
     ITableWorkspace_sptr ws =
         boost::make_shared<Mantid::DataObjects::TableWorkspace>();
-    TS_ASSERT_THROWS(factory.initialize(ws), std::runtime_error);
+    TS_ASSERT_THROWS(factory.initialize(ws), const std::runtime_error &);
   }
 
   void testCreateWithoutInitaliseThrows() {
@@ -89,7 +89,7 @@ public:
 
     vtkMDQuadFactory factory(Mantid::VATES::VolumeNormalization);
     // initialize not called!
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testCreation() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
index c2ebc679a656d6b262ff4e422c0ca995b779b055..26f4745cde46020a436f9baf2f9fb129a0568e56 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h
@@ -162,13 +162,13 @@ public:
 
     TSM_ASSERT_THROWS(
         "No workspace, so should not be possible to complete initialization.",
-        factory.initialize(ws_sptr), std::runtime_error);
+        factory.initialize(ws_sptr), const std::runtime_error &);
   }
 
   void testCreateWithoutInitializeThrows() {
     FakeProgressAction progressUpdate;
     vtkPeakMarkerFactory factory("signal");
-    TS_ASSERT_THROWS(factory.create(progressUpdate), std::runtime_error);
+    TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testTypeName() {
diff --git a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h
index 906a418713ce8788a5bb3a5fddb35450108eb1b0..565545bbde30159a6e379bae89ee070fcdebe68b 100644
--- a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h
+++ b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h
@@ -44,7 +44,7 @@ public:
     FakeProgressAction progressUpdate;
     vtkSplatterPlotFactory factory("signal");
     TSM_ASSERT_THROWS("Have NOT initalized object. Should throw.",
-                      factory.create(progressUpdate), std::runtime_error);
+                      factory.create(progressUpdate), const std::runtime_error &);
   }
 
   void testInitializeWithNullWorkspaceThrows() {
@@ -52,7 +52,7 @@ public:
     IMDEventWorkspace *ws = nullptr;
     TSM_ASSERT_THROWS("This is a NULL workspace. Should throw.",
                       factory.initialize(Workspace_sptr(ws)),
-                      std::invalid_argument);
+                      const std::invalid_argument &);
   }
 
   /*Demonstrative tests*/
diff --git a/qt/python/mantidqt/_common.sip b/qt/python/mantidqt/_common.sip
index 2a7c103f0e92e9e7aa86b81934d71efbf11d1e5e..3f594864ad4702dccc85cfca9a46ead9eca93d27 100644
--- a/qt/python/mantidqt/_common.sip
+++ b/qt/python/mantidqt/_common.sip
@@ -129,7 +129,7 @@ public:
 
 public:
   ScriptEditor(const QString &lexer, const QFont &font = QFont(),
-               QWidget *parent /TransferThis/ = 0) throw(std::invalid_argument);
+               QWidget *parent /TransferThis/ = 0) throw(const std::invalid_argument &);
 
   QString fileName() const;
   SIP_PYTUPLE getSelection() const;
@@ -145,7 +145,7 @@ public:
   QString selectedText() const;
   QString text() const;
 
-  void clearKeyBinding(const QString &keyCombination) throw(std::invalid_argument);
+  void clearKeyBinding(const QString &keyCombination) throw(const std::invalid_argument &);
   void enableAutoCompletion(AutoCompletionSource source);
   void disableAutoCompletion();
   void getCursorPosition(int *line, int *index) const;
@@ -344,7 +344,7 @@ class AlgorithmHistoryWindow : public QDialog {
 #include "MantidQtWidgets/Common/AlgorithmHistoryWindow.h"
 %End
 public:
-	AlgorithmHistoryWindow(QWidget *parent /TransferThis/, const QString &workspaceName) throw(std::invalid_argument);
+	AlgorithmHistoryWindow(QWidget *parent /TransferThis/, const QString &workspaceName) throw(const std::invalid_argument &);
 };
 
 // ---------------------------------
diff --git a/qt/python/mantidqtpython/mantidqtpython_def.sip b/qt/python/mantidqtpython/mantidqtpython_def.sip
index 2452b3aa6fadd9e7d3cab3b0246f9f00a6c922e6..f6f83a2eef37d8f65af7aa6eb8cce3799b32696b 100644
--- a/qt/python/mantidqtpython/mantidqtpython_def.sip
+++ b/qt/python/mantidqtpython/mantidqtpython_def.sip
@@ -311,7 +311,7 @@ LineViewer
 
 public:
 
-void apply()   throw (std::runtime_error);
+void apply()   throw (const std::runtime_error &);
 %Docstring
 void LineViewer::apply()
 ------------------------
@@ -341,7 +341,7 @@ void LineViewer::showFull()
 
 
 //*WIKI* ==== Start/End Points ====
-void setStartXY(double x, double y)   throw (std::runtime_error);
+void setStartXY(double x, double y)   throw (const std::runtime_error &);
 %Docstring
 void LineViewer::setStartXY(double x, double y)
 -----------------------------------------------
@@ -355,7 +355,7 @@ void LineViewer::setStartXY(double x, double y)
 
 %End
 
-void setEndXY(double x, double y)   throw (std::runtime_error);
+void setEndXY(double x, double y)   throw (const std::runtime_error &);
 %Docstring
 void LineViewer::setEndXY(double x, double y)
 ---------------------------------------------
@@ -385,7 +385,7 @@ void LineViewer::setThickness(double width)
 
 %End
 
-void setThickness(int dim, double width)   throw (std::invalid_argument, std::runtime_error);
+void setThickness(int dim, double width)   throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 void LineViewer::setThickness(int dim, double width)
 ----------------------------------------------------
@@ -405,7 +405,7 @@ void LineViewer::setThickness(int dim, double width)
 
 %End
 
-void setThickness(const QString & dim, double width)   throw (std::invalid_argument, std::runtime_error);
+void setThickness(const QString & dim, double width)   throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 void LineViewer::setThickness(const QString & dim, double width)
 ----------------------------------------------------------------
@@ -447,7 +447,7 @@ double LineViewer::getPlanarWidth()
 
 
 //*WIKI* ==== Binning ====
-void setNumBins(int numBins)   throw (std::invalid_argument);
+void setNumBins(int numBins)   throw (const std::invalid_argument &);
 %Docstring
 void LineViewer::setNumBins(int numBins)
 ----------------------------------------
@@ -461,7 +461,7 @@ void LineViewer::setNumBins(int numBins)
 
 %End
 
-void setFixedBinWidthMode(bool fixedWidth, double binWidth)   throw (std::invalid_argument);
+void setFixedBinWidthMode(bool fixedWidth, double binWidth)   throw (const std::invalid_argument &);
 %Docstring
 void LineViewer::setFixedBinWidthMode(bool fixedWidth, double binWidth)
 -----------------------------------------------------------------------
@@ -670,7 +670,7 @@ SliceViewer
 
 public:
   //*WIKI* ==== Basics ====
-  void setWorkspace(const QString & wsName)   throw (std::runtime_error);
+  void setWorkspace(const QString & wsName)   throw (const std::runtime_error &);
 %Docstring
 void SliceViewer::setWorkspace(const QString & wsName)
 ------------------------------------------------------
@@ -708,7 +708,7 @@ void SliceViewer::showControls(bool visible)
 
 %End
 
-  void openFromXML(const QString & xml)   throw (std::invalid_argument, std::runtime_error);
+  void openFromXML(const QString & xml)   throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 void SliceViewer::openFromXML(const QString & xml)
 --------------------------------------------------
@@ -803,7 +803,7 @@ void SliceViewer::toggleLineMode(bool lineMode)
 
 
   //*WIKI* ==== X/Y Dimension ====
-  void setXYDim(int indexX, int indexY)     throw (std::invalid_argument);
+  void setXYDim(int indexX, int indexY)     throw (const std::invalid_argument &);
 %Docstring
 void SliceViewer::setXYDim(int indexX, int indexY)
 --------------------------------------------------
@@ -822,7 +822,7 @@ void SliceViewer::setXYDim(int indexX, int indexY)
 
 %End
 
-  void setXYDim(const QString & dimX, const QString & dimY)     throw (std::invalid_argument, std::runtime_error);
+  void setXYDim(const QString & dimX, const QString & dimY)     throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 void SliceViewer::setXYDim(const QString & dimX, const QString & dimY)
 ----------------------------------------------------------------------
@@ -861,7 +861,7 @@ int SliceViewer::getDimY()
 
 
   //*WIKI* ==== Slice Point ====
-  void setSlicePoint(int dim, double value)     throw (std::invalid_argument);
+  void setSlicePoint(int dim, double value)     throw (const std::invalid_argument &);
 %Docstring
 void SliceViewer::setSlicePoint(int dim, double value)
 ------------------------------------------------------
@@ -878,7 +878,7 @@ void SliceViewer::setSlicePoint(int dim, double value)
 
 %End
 
-  void setSlicePoint(const QString & dim, double value)   throw (std::invalid_argument, std::runtime_error);
+  void setSlicePoint(const QString & dim, double value)   throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 void SliceViewer::setSlicePoint(const QString & dim, double value)
 ------------------------------------------------------------------
@@ -895,7 +895,7 @@ void SliceViewer::setSlicePoint(const QString & dim, double value)
 
 %End
 
-  double getSlicePoint(int dim) const     throw (std::invalid_argument);
+  double getSlicePoint(int dim) const     throw (const std::invalid_argument &);
 %Docstring
 double SliceViewer::getSlicePoint(int dim)
 ------------------------------------------
@@ -913,7 +913,7 @@ double SliceViewer::getSlicePoint(int dim)
 
 %End
 
-  double getSlicePoint(const QString & dim) const   throw (std::invalid_argument, std::runtime_error);
+  double getSlicePoint(const QString & dim) const   throw (std::invalid_argument, const std::runtime_error &);
 %Docstring
 double SliceViewer::getSlicePoint(const QString & dim)
 ------------------------------------------------------
@@ -1022,7 +1022,7 @@ void SliceViewer::loadColorMap(QString filename)
 
 %End
 
-  void setColorScale(double min, double max, int type)      throw (std::invalid_argument);
+  void setColorScale(double min, double max, int type)      throw (const std::invalid_argument &);
 %Docstring
 void SliceViewer::setColorScale(double min, double max, int type)
 -----------------------------------------------------------------
@@ -1039,7 +1039,7 @@ void SliceViewer::setColorScale(double min, double max, int type)
 
 %End
 
-  void setColorScaleMin(double min)      throw (std::invalid_argument);
+  void setColorScaleMin(double min)      throw (const std::invalid_argument &);
 %Docstring
 void SliceViewer::setColorScaleMin(double min)
 ----------------------------------------------
@@ -1054,7 +1054,7 @@ void SliceViewer::setColorScaleMin(double min)
 
 %End
 
-  void setColorScaleMax(double max)      throw (std::invalid_argument);
+  void setColorScaleMax(double max)      throw (const std::invalid_argument &);
 %Docstring
 void SliceViewer::setColorScaleMax(double max)
 ----------------------------------------------
@@ -1207,7 +1207,7 @@ void SliceViewer::setColorBarAutoScale(bool autoscale)
 %End
 
   //*WIKI* ==== Dynamic Rebinning ====
-  void setRebinThickness(int dim, double thickness)   throw (std::runtime_error);
+  void setRebinThickness(int dim, double thickness)   throw (const std::runtime_error &);
 %Docstring
 void SliceViewer::setRebinThickness(int dim, double thickness)
 --------------------------------------------------------------
@@ -1222,7 +1222,7 @@ void SliceViewer::setRebinThickness(int dim, double thickness)
 
 %End
 
-  void setRebinNumBins(int xBins, int yBins)   throw (std::runtime_error);
+  void setRebinNumBins(int xBins, int yBins)   throw (const std::runtime_error &);
 %Docstring
 void SliceViewer::setRebinNumBins(int xBins, int yBins)
 -------------------------------------------------------
@@ -1237,7 +1237,7 @@ void SliceViewer::setRebinNumBins(int xBins, int yBins)
 
 %End
 
-  void setRebinMode(bool mode)   throw (std::runtime_error);
+  void setRebinMode(bool mode)   throw (const std::runtime_error &);
 %Docstring
 void SliceViewer::setRebinMode(bool mode)
 ------------------------------------------------------
@@ -1252,7 +1252,7 @@ void SliceViewer::setRebinMode(bool mode)
 
 %End
 
-  void refreshRebin()   throw (std::runtime_error);
+  void refreshRebin()   throw (const std::runtime_error &);
 %Docstring
 void SliceViewer::refreshRebin()
 --------------------------------
@@ -1323,7 +1323,7 @@ WidgetFactory
 public:
   static MantidQt::Factory::WidgetFactory* Instance();
   MantidQt::SliceViewer::SliceViewerWindow* createSliceViewerWindow(const QString& wsName, const QString& label);
-  MantidQt::SliceViewer::SliceViewerWindow* getSliceViewerWindow(const QString& wsName, const QString& label)   throw (std::runtime_error);
+  MantidQt::SliceViewer::SliceViewerWindow* getSliceViewerWindow(const QString& wsName, const QString& label)   throw (const std::runtime_error &);
   void closeAllSliceViewerWindows();
 %Docstring
 void WidgetFactory::closeAllSliceViewerWindows()
diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp
index c931189e0e3d4d6c83e5e00b0058bcb7ad5311b3..8a2c8cb403747578e12eaec1da8664b28cd66af6 100644
--- a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp
+++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp
@@ -728,7 +728,7 @@ void EnggDiffFittingPresenter::plotAlignedWorkspace(
                             generateXAxisLabel(ws->getAxis(0)->unit()));
       m_view->showStatus("Peaks fitted successfully");
     }
-  } catch (std::runtime_error) {
+  } catch (const std::runtime_error &) {
     g_log.error()
         << "Unable to finish of the plotting of the graph for "
            "engggui_fitting_focused_fitpeaks  workspace. Error "
diff --git a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h
index 2bff9fd91f47e6e99e0ecffeff52e2904788eb2c..076fc9bb822a49056949a78e25cb6b08aa67a6a9 100644
--- a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h
+++ b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h
@@ -185,7 +185,7 @@ public:
   void
   test_that_setResolution_will_throw_when_provided_the_name_of_a_workspace_which_does_not_exist() {
     TS_ASSERT_THROWS(m_model->setResolution("InvalidName", 0),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
@@ -196,7 +196,7 @@ public:
 
   void
   test_that_setResolution_will_throw_when_provided_an_index_that_is_out_of_range() {
-    TS_ASSERT_THROWS(m_model->setResolution(m_workspace, 5), std::out_of_range);
+    TS_ASSERT_THROWS(m_model->setResolution(m_workspace, 5), const std::out_of_range &);
   }
 
 private:
diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
index 02b9957b015827ff252d5e08c2788f045813b056..b582b35be0c17b430010120cf674f01332395152 100644
--- a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
+++ b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
@@ -270,9 +270,9 @@ public:
         "10", "100000000000000000000000000000", "1,5,10", "1,2,3,4,5,6,22"};
 
     for (auto i = 0u; i < spectraPairs.size(); ++i)
-      TS_ASSERT_THROWS(data->setSpectra(spectraPairs[i]), std::runtime_error);
+      TS_ASSERT_THROWS(data->setSpectra(spectraPairs[i]), const std::runtime_error &);
     for (auto i = 0u; i < spectraStrings.size(); ++i)
-      TS_ASSERT_THROWS(data->setSpectra(spectraStrings[i]), std::runtime_error);
+      TS_ASSERT_THROWS(data->setSpectra(spectraStrings[i]), const std::runtime_error &);
   }
 
   void test_no_throw_when_setSpectra_is_provided_a_valid_spectra() {
diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h
index 12f1bc962c207c7d5d29fae3a14d761a8ce2b571..81299d75d5a31acc540b116b594c10226bcbd169 100644
--- a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h
+++ b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h
@@ -211,16 +211,16 @@ public:
   }
 
   void test_that_plotResult_will_throw_when_there_is_no_result_workspace_set() {
-    TS_ASSERT_THROWS(m_model->plotResult("HWHM"), std::runtime_error);
+    TS_ASSERT_THROWS(m_model->plotResult("HWHM"), const std::runtime_error &);
   }
 
   void test_that_plotPDF_will_throw_when_there_is_no_pdf_workspace_set() {
     TS_ASSERT_THROWS(m_model->plotPDF("WorkspaceName", "HWHM"),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void test_that_saveResult_will_throw_when_there_is_no_result_workspace_set() {
-    TS_ASSERT_THROWS(m_model->saveResult(), std::runtime_error);
+    TS_ASSERT_THROWS(m_model->saveResult(), const std::runtime_error &);
   }
 
   void
@@ -286,7 +286,7 @@ public:
     auto const outputName("Output_Result");
 
     TS_ASSERT_THROWS(m_model->replaceFitResult("", singleBinName, outputName),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
@@ -295,7 +295,7 @@ public:
     auto const outputName("Output_Result");
 
     TS_ASSERT_THROWS(m_model->replaceFitResult(inputName, "", outputName),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
@@ -304,7 +304,7 @@ public:
     auto const singleBinName("Workspace_s0_Result");
 
     TS_ASSERT_THROWS(m_model->replaceFitResult(inputName, singleBinName, ""),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
 private:
diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h
index 9814c97ae17a9b1adb0f359d12ab4b1e86338636..f410ce301f1b86041d7689d60d89e94c31abdc8a 100644
--- a/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h
+++ b/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h
@@ -207,7 +207,7 @@ public:
     std::string const spectraString("");
 
     TS_ASSERT_THROWS(model->addWorkspace("WorkspaceName", spectraString),
-                     std::runtime_error);
+                     const std::runtime_error &);
   }
 
   void
@@ -514,7 +514,7 @@ public:
 
   void test_that_getNumberOfSpectra_throws_if_dataIndex_is_out_of_range() {
     auto const model = createModelWithSingleWorkspace("WorkspaceName", 3);
-    TS_ASSERT_THROWS(model->getNumberOfSpectra(1), std::runtime_error);
+    TS_ASSERT_THROWS(model->getNumberOfSpectra(1), const std::runtime_error &);
   }
 
   void
@@ -621,7 +621,7 @@ public:
   void
   test_that_removeWorkspace_throws_when_provided_an_out_of_range_dataIndex() {
     auto model = createModelWithMultipleWorkspaces(3, "Ws1", "Ws2");
-    TS_ASSERT_THROWS(model->removeWorkspace(2), std::runtime_error);
+    TS_ASSERT_THROWS(model->removeWorkspace(2), const std::runtime_error &);
   }
 
   void test_that_clearWorkspaces_will_empty_the_fittingData() {
diff --git a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h
index 6955a4be9905e95aeda042d7e9162f05b5003023..064a20d117c7fb4a4c0bbe1a6fb822fad981fd37 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h
@@ -71,7 +71,7 @@ public:
                 << "HIFI";
     files << "emu00006473.nxs";
     MuonAnalysisDataLoader loader(DeadTimesType::None, instruments);
-    TS_ASSERT_THROWS(loader.loadFiles(files), std::runtime_error);
+    TS_ASSERT_THROWS(loader.loadFiles(files), const std::runtime_error &);
   }
 
   /// Test special case for DEVA files
@@ -132,7 +132,7 @@ public:
   void test_getDeadTimesTable_FromFile_NotPresent() {
     MuonAnalysisDataLoader loader(DeadTimesType::FromFile, {"MUSR"});
     LoadResult result;
-    TS_ASSERT_THROWS(loader.getDeadTimesTable(result), std::runtime_error);
+    TS_ASSERT_THROWS(loader.getDeadTimesTable(result), const std::runtime_error &);
   }
 
   void test_getDeadTimesTable_FromFile() {
@@ -342,7 +342,7 @@ private:
 
     if (shouldThrow) {
       TS_ASSERT_THROWS(loader.setProcessAlgorithmProperties(alg, options),
-                       std::invalid_argument);
+                       const std::invalid_argument &);
     } else {
       TS_ASSERT_THROWS_NOTHING(
           loader.setProcessAlgorithmProperties(alg, options));
diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
index f4a8c49ed053f5f298aad344d04e239eecd7c092..b1401a65077c789672b4ff4760b314f4ded65a9c 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h
@@ -34,9 +34,9 @@ using Mantid::API::TableRow;
 using Mantid::API::Workspace;
 using Mantid::API::WorkspaceFactory;
 using Mantid::API::WorkspaceGroup;
-using MantidQt::CustomInterfaces::Muon::DeadTimesType;
 using MantidQt::CustomInterfaces::MuonAnalysisDataLoader;
 using MantidQt::CustomInterfaces::MuonAnalysisFitDataPresenter;
+using MantidQt::CustomInterfaces::Muon::DeadTimesType;
 using MantidQt::MantidWidgets::IMuonFitDataModel;
 using MantidQt::MantidWidgets::IMuonFitDataSelector;
 using MantidQt::MantidWidgets::IWorkspaceFitControl;
@@ -503,7 +503,7 @@ public:
     const std::string baseName("MuonSimulFit_UniqueLabelThatIsNotInTheADS");
     TS_ASSERT(!AnalysisDataService::Instance().doesExist(baseName));
     TS_ASSERT_THROWS(m_presenter->handleFittedWorkspaces(baseName),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_extractFittedWorkspaces_defaultGroupName() {
@@ -569,7 +569,7 @@ public:
     const std::string baseName = "MuonSimulFit_UniqueLabelThatIsNotInTheADS";
     TS_ASSERT(!AnalysisDataService::Instance().doesExist(baseName));
     TS_ASSERT_THROWS(m_presenter->extractFittedWorkspaces(baseName),
-                     Mantid::Kernel::Exception::NotFoundError);
+                     const Mantid::Kernel::Exception::NotFoundError &);
   }
 
   void test_checkAndUpdateFitLabel_Simultaneous_NoOverwrite_ShouldUpdate() {
diff --git a/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h b/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h
index 72e1f51c2d8436077d93376a4716e83b40027daa..d3bfb080bdb32f17a6bf5ad0bbd4834734f8d708 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h
@@ -404,7 +404,7 @@ public:
     const auto currentWs = createWs("MUSR", 15189);
     const auto loadedWs = nullptr;
     TS_ASSERT_THROWS(isReloadGroupingNecessary(currentWs, loadedWs),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_isReloadGroupingNecessary_noLogs() {
diff --git a/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h b/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h
index 648768c3451f6bc5923412854b991e693a534e52..f436125c8a9a2b2f0fb8fecc05fb61df5c53d3a8 100644
--- a/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h
+++ b/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h
@@ -90,7 +90,7 @@ public:
                                 "EMU00020919; Pair; long; Asym; #1"});
     MuonAnalysisResultTableCreator creator(workspaces, m_logs, &m_logValues,
                                            false);
-    TS_ASSERT_THROWS(creator.createTable(), std::runtime_error);
+    TS_ASSERT_THROWS(creator.createTable(), const std::runtime_error &);
   }
 
   void test_createTable_throws_noLogs() {
@@ -100,7 +100,7 @@ public:
     this->setUpLogs(workspaces);
     MuonAnalysisResultTableCreator creator(workspaces, QStringList(),
                                            &m_logValues, false);
-    TS_ASSERT_THROWS(creator.createTable(), std::runtime_error);
+    TS_ASSERT_THROWS(creator.createTable(), const std::runtime_error &);
   }
 
   /// Two separate fits of one run each
@@ -168,7 +168,7 @@ public:
     // Test
     MuonAnalysisResultTableCreator creator(workspaces, m_logs, &m_logValues,
                                            false);
-    TS_ASSERT_THROWS(creator.createTable(), std::runtime_error);
+    TS_ASSERT_THROWS(creator.createTable(), const std::runtime_error &);
   }
 
   /// Sequential fit of two runs
@@ -303,7 +303,7 @@ public:
 
     // Test
     MuonAnalysisResultTableCreator creator(labels, m_logs, &m_logValues, true);
-    TS_ASSERT_THROWS(creator.createTable(), std::runtime_error);
+    TS_ASSERT_THROWS(creator.createTable(), const std::runtime_error &);
   }
 
   void test_haveSameParameters_Yes() {
diff --git a/qt/scientific_interfaces/test/RunMapTest.h b/qt/scientific_interfaces/test/RunMapTest.h
index 78d1a0cb35cd0ad544dadcb654c898de5d04c90a..e6cba08045ee521371eb6092704424d4c1c535ae 100644
--- a/qt/scientific_interfaces/test/RunMapTest.h
+++ b/qt/scientific_interfaces/test/RunMapTest.h
@@ -26,7 +26,7 @@ public:
     TS_ASSERT_THROWS_NOTHING(runMap.add(morphism, "Morphism"));
 
     const RunLabel al("789", 4);
-    TS_ASSERT_THROWS(runMap.add(al, "Al"), std::invalid_argument);
+    TS_ASSERT_THROWS(runMap.add(al, "Al"), const std::invalid_argument &);
 
     TS_ASSERT(runMap.contains(polly));
     TS_ASSERT(runMap.contains(morphism));
@@ -57,7 +57,7 @@ public:
     TS_ASSERT(!runMap.contains(polly));
 
     const RunLabel invalid("123", 4);
-    TS_ASSERT_THROWS(runMap.remove(invalid), std::invalid_argument);
+    TS_ASSERT_THROWS(runMap.remove(invalid), const std::invalid_argument &);
   }
 
   void test_getRunLabels() {
diff --git a/qt/widgets/common/src/MuonFitPropertyBrowser.cpp b/qt/widgets/common/src/MuonFitPropertyBrowser.cpp
index 019c9b5f9163ba78150e219e25070d6577f58a4c..a726a6b646d0e38fb4f4375673292ea348e8f17b 100644
--- a/qt/widgets/common/src/MuonFitPropertyBrowser.cpp
+++ b/qt/widgets/common/src/MuonFitPropertyBrowser.cpp
@@ -1679,7 +1679,7 @@ bool MuonFitPropertyBrowser::isPeriodValid(const QString &name) {
             // if the box does not exist and there is more than 1 period in name
             return false;
           }
-        } catch (boost::bad_lexical_cast) {
+        } catch (const boost::bad_lexical_cast &) {
           // none int value
           return false;
         }
diff --git a/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h
index 730a23d0baad0b7f9e4be05eaba4e1b5d3c96738..a2a59e97595d6847e24f283b42f8d2b26029b68f 100644
--- a/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h
+++ b/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h
@@ -37,13 +37,13 @@ public:
   void test_invalid_algorithms() {
     // Algorithms with no 'str list' property
     TS_ASSERT_THROWS(PostprocessingAlgorithm("StepScan"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Algorithms with more than one 'str list' property
     TS_ASSERT_THROWS(PostprocessingAlgorithm("PDDetermineCharacterizations"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Algorithms with invalid output ws properties
     TS_ASSERT_THROWS(PostprocessingAlgorithm("GroupWorkspaces"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_valid_algorithms() {
diff --git a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h
index 98f2b50494fe68cb54fd3fce09e2c46c4d63ee1f..694dc84a8210a54b299d7b26c97a9550c9f2f537 100644
--- a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h
+++ b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h
@@ -36,13 +36,13 @@ public:
 
   void test_invalid_algorithms() {
     // Algorithm with a single input ws property
-    TS_ASSERT_THROWS(PreprocessingAlgorithm("Rebin"), std::invalid_argument);
+    TS_ASSERT_THROWS(PreprocessingAlgorithm("Rebin"), const std::invalid_argument &);
     // Algorithm with more than two input ws properties
     TS_ASSERT_THROWS(PreprocessingAlgorithm("ReflectometryReductionOneAuto"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Algorithm with two input ws properties but no output ws properties
     TS_ASSERT_THROWS(PreprocessingAlgorithm("ConjoinWorkspaces"),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_valid_algorithms() {
diff --git a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h
index 8db1386d2f8a39530570ed743fd25fbe1285ad82..15e763876c3edb2b59c9b31dfcb7218fbf877c76 100644
--- a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h
+++ b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h
@@ -52,10 +52,10 @@ public:
 
     // Algorithms with no input workspace properties
     TS_ASSERT_THROWS(ProcessingAlgorithm("Stitch1DMany", prefix, 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     // Algorithms with no output workspace properties
     TS_ASSERT_THROWS(ProcessingAlgorithm("SaveAscii", prefix, 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
   void test_ReflectometryReductionOneAuto() {
 
@@ -69,12 +69,12 @@ public:
     // This should throw
     TS_ASSERT_THROWS(
         ProcessingAlgorithm(algName, prefixes, 0, std::set<QString>()),
-        std::invalid_argument);
+        const std::invalid_argument &);
 
     // This should also throw
     TS_ASSERT_THROWS(
         ProcessingAlgorithm(algName, prefixes, 0, std::set<QString>()),
-        std::invalid_argument);
+        const std::invalid_argument &);
     // But this should be OK
     prefixes.emplace_back("IvsLam_");
     TS_ASSERT_THROWS_NOTHING(
diff --git a/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h b/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h
index 7946effb182ec82f3954148d53b5651a231f42ac..c9e2fe1364678907d81b4ee2fbb01b0ac4c08f15 100644
--- a/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h
+++ b/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h
@@ -71,12 +71,12 @@ public:
 
     ws->addColumn("str", "Group");
     TS_ASSERT_THROWS(QOneLevelTreeModel(ws, m_whitelist),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     ws->addColumn("str", "Group1");
     ws->addColumn("str", "Group2");
     TS_ASSERT_THROWS(QOneLevelTreeModel(ws, m_whitelist),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testConstructorOneRowTable() {
@@ -272,8 +272,8 @@ public:
     model.setProcessed(true, 2);
 
     // Non-existent row
-    TS_ASSERT_THROWS(model.isProcessed(10), std::invalid_argument);
-    TS_ASSERT_THROWS(model.isProcessed(-1), std::invalid_argument);
+    TS_ASSERT_THROWS(model.isProcessed(10), const std::invalid_argument &);
+    TS_ASSERT_THROWS(model.isProcessed(-1), const std::invalid_argument &);
 
     // Only 1st and 3rd rows are processed
     TS_ASSERT_EQUALS(model.isProcessed(0), true);
diff --git a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h
index a1b2e5d4881171ad475fae2c9c17c5bcf0d6471f..b0da705f2586de56930916bc71545dbe64fada8d 100644
--- a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h
+++ b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h
@@ -110,12 +110,12 @@ public:
 
     ws->removeColumn("Group");
     TS_ASSERT_THROWS(QTwoLevelTreeModel(ws, m_whitelist),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     ws->addColumn("str", "Group1");
     ws->addColumn("str", "Group2");
     TS_ASSERT_THROWS(QTwoLevelTreeModel(ws, m_whitelist),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void testConstructorOneRowTable() {
@@ -703,13 +703,13 @@ public:
 
     // Non-existent row
     TS_ASSERT_THROWS(model.isProcessed(10, model.index(0, 0)),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(model.isProcessed(-1, model.index(0, 0)),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
 
     // Non-existent group
-    TS_ASSERT_THROWS(model.isProcessed(10), std::invalid_argument);
-    TS_ASSERT_THROWS(model.isProcessed(-1), std::invalid_argument);
+    TS_ASSERT_THROWS(model.isProcessed(10), const std::invalid_argument &);
+    TS_ASSERT_THROWS(model.isProcessed(-1), const std::invalid_argument &);
 
     // Only the 1st row of 1st group and 2nd group should be highlighted
     TS_ASSERT_EQUALS(model.isProcessed(model.index(0, 0).row(), QModelIndex()),
@@ -729,7 +729,7 @@ public:
     auto rowValues = std::map<QString, QString>{{"Column1", "row_10"},
                                                 {"Column2", "row_11"}};
     auto rowsToTransfer = std::vector<std::map<QString, QString>>{{rowValues}};
-    TS_ASSERT_THROWS(model.transfer(rowsToTransfer), std::invalid_argument);
+    TS_ASSERT_THROWS(model.transfer(rowsToTransfer), const std::invalid_argument &);
   }
 
   void testTransferToExistingGroup() {
diff --git a/qt/widgets/common/test/LogValueFinderTest.h b/qt/widgets/common/test/LogValueFinderTest.h
index 2f0598917ed6c8beb545aebb71fd7651b5517e77..a2f8014b2b90b4945a3e455c45fb1b23725736d3 100644
--- a/qt/widgets/common/test/LogValueFinderTest.h
+++ b/qt/widgets/common/test/LogValueFinderTest.h
@@ -113,9 +113,9 @@ public:
             << QString::fromStdString(ws1.name());
     LogValueFinder finder(wsNames);
     TS_ASSERT_THROWS(finder.getLogValue("boolProp", StatisticType::Mean, 0),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
     TS_ASSERT_THROWS(finder.getLogValue("boolProp", StatisticType::Mean, 1),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
   void test_getLogValue_nonExistentWorkspace_throws() {
@@ -127,7 +127,7 @@ public:
     LogValueFinder finder(wsNames);
     TS_ASSERT_THROWS(
         finder.getLogValue("dblProp", StatisticType::Mean, "no_workspace"),
-        std::invalid_argument);
+        const std::invalid_argument &);
   }
 
   void test_getLogValue_indexOutOfRange_throws() {
@@ -138,7 +138,7 @@ public:
             << QString::fromStdString(ws1.name());
     LogValueFinder finder(wsNames);
     TS_ASSERT_THROWS(finder.getLogValue("dblProp", StatisticType::Mean, 2),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 
 private:
diff --git a/qt/widgets/common/test/ParseKeyValueStringTest.h b/qt/widgets/common/test/ParseKeyValueStringTest.h
index b9c85bc4d5607fa0d8cfd3ae0d82198ba0fd3034..8c100c84011420901e9f1a39e535d338dcda9d21 100644
--- a/qt/widgets/common/test/ParseKeyValueStringTest.h
+++ b/qt/widgets/common/test/ParseKeyValueStringTest.h
@@ -29,12 +29,12 @@ public:
     TS_ASSERT_EQUALS(kvp["g"], "'");
 
     TS_ASSERT_THROWS(parseKeyValueString("a = 1, b = 2, c = 3,"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(parseKeyValueString("a = 1, b = 2, c = 3,d"),
-                     std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueString(",a = 1"), std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueString(",a = 1 = 2,="), std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueString("=,=,="), std::runtime_error);
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueString(",a = 1"), const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueString(",a = 1 = 2,="), const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueString("=,=,="), const std::runtime_error &);
   }
 
   void testParseKeyValueQString() {
@@ -50,12 +50,12 @@ public:
     TS_ASSERT_EQUALS(kvp["g"], "'");
 
     TS_ASSERT_THROWS(parseKeyValueQString("a = 1, b = 2, c = 3,"),
-                     std::runtime_error);
+                     const std::runtime_error &);
     TS_ASSERT_THROWS(parseKeyValueQString("a = 1, b = 2, c = 3,d"),
-                     std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueQString(",a = 1"), std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueQString(",a = 1 = 2,="), std::runtime_error);
-    TS_ASSERT_THROWS(parseKeyValueQString("=,=,="), std::runtime_error);
+                     const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueQString(",a = 1"), const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueQString(",a = 1 = 2,="), const std::runtime_error &);
+    TS_ASSERT_THROWS(parseKeyValueQString("=,=,="), const std::runtime_error &);
   }
 };
 
diff --git a/qt/widgets/common/test/PlotAxisTest.h b/qt/widgets/common/test/PlotAxisTest.h
index 16b42d1cbec65c93c53fb43a55e6386e54ff9bc7..5b03a086aaac6b01a006b0bcb9733a56c95a78bc 100644
--- a/qt/widgets/common/test/PlotAxisTest.h
+++ b/qt/widgets/common/test/PlotAxisTest.h
@@ -194,8 +194,8 @@ public:
   test_Index_Greater_Than_numDims_Or_Less_Than_Zero_Throws_Invalid_Argument() {
     using MantidQt::API::PlotAxis;
     auto ws = WorkspaceCreationHelper::create2DWorkspace(1, 1);
-    TS_ASSERT_THROWS(PlotAxis(*ws, 2), std::invalid_argument);
-    TS_ASSERT_THROWS(PlotAxis(*ws, -1), std::invalid_argument);
+    TS_ASSERT_THROWS(PlotAxis(*ws, 2), const std::invalid_argument &);
+    TS_ASSERT_THROWS(PlotAxis(*ws, -1), const std::invalid_argument &);
   }
 };
 
diff --git a/qt/widgets/common/test/Python/SipTest.h b/qt/widgets/common/test/Python/SipTest.h
index 56b1e13daddf532886d1d9438daf05531e03aecd..72b1e27880ea18e1511943bef4757837fdffd01d 100644
--- a/qt/widgets/common/test/Python/SipTest.h
+++ b/qt/widgets/common/test/Python/SipTest.h
@@ -60,7 +60,7 @@ public:
     struct Foo;
     TS_ASSERT_THROWS(
         MantidQt::Widgets::Common::Python::extract<Foo>(nonSipType),
-        std::runtime_error);
+        const std::runtime_error &);
   }
 };
 
diff --git a/qt/widgets/instrumentview/src/InstrumentWidget.cpp b/qt/widgets/instrumentview/src/InstrumentWidget.cpp
index 571c1b76ae6eda6adef425d7781d2de9c52aea71..c833c0d7631e2e5fe338e94732b73c8647fcfdca 100644
--- a/qt/widgets/instrumentview/src/InstrumentWidget.cpp
+++ b/qt/widgets/instrumentview/src/InstrumentWidget.cpp
@@ -1368,7 +1368,7 @@ Workspace_sptr InstrumentWidget::getWorkspaceFromADS(const std::string &name) {
 
   try {
     workspace = AnalysisDataService::Instance().retrieve(name);
-  } catch (std::runtime_error) {
+  } catch (const std::runtime_error &) {
     QMessageBox::warning(this, "Mantid - Warning",
                          "No workspace called '" +
                              QString::fromStdString(name) + "' found. ");
diff --git a/qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp b/qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp
index b41c47b05ff6cc1115da372bea4deaa1b6b86e0d..f10f35a20501489086608921682081a40e46ba24 100644
--- a/qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp
+++ b/qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp
@@ -960,7 +960,7 @@ void InstrumentWidgetMaskTab::saveMaskingToTableWorkspace(bool invertMask) {
     temptablews = boost::dynamic_pointer_cast<Mantid::API::ITableWorkspace>(
         Mantid::API::AnalysisDataService::Instance().retrieve(
             outputWorkspaceName));
-  } catch (Mantid::Kernel::Exception::NotFoundError) {
+  } catch (const Mantid::Kernel::Exception::NotFoundError &) {
     std::cout << "TableWorkspace " << outputWorkspaceName
               << " cannot be found in ADS."
               << ".\n";
diff --git a/qt/widgets/instrumentview/src/UnwrappedSurface.cpp b/qt/widgets/instrumentview/src/UnwrappedSurface.cpp
index c522499e45945423a57c00fa4ddef631cc3137b5..7ef2b77ffece0b9e53c97b714b6ced07b698705b 100644
--- a/qt/widgets/instrumentview/src/UnwrappedSurface.cpp
+++ b/qt/widgets/instrumentview/src/UnwrappedSurface.cpp
@@ -699,7 +699,7 @@ UnwrappedSurface::retrievePeaksWorkspace(const std::string &name) const {
 
   try {
     ws = AnalysisDataService::Instance().retrieve(name);
-  } catch (std::runtime_error) {
+  } catch (const std::runtime_error &) {
     // couldn't find the workspace in the ADS for some reason
     // just fail silently. There's nothing more we can do.
     return nullptr;
diff --git a/qt/widgets/mplcpp/test/ArtistTest.h b/qt/widgets/mplcpp/test/ArtistTest.h
index 2872a928f128473941d4caaee383156868cefe9e..34af9dfe1a8532a14b72ce3935752904cb0c6359 100644
--- a/qt/widgets/mplcpp/test/ArtistTest.h
+++ b/qt/widgets/mplcpp/test/ArtistTest.h
@@ -48,7 +48,7 @@ public:
 
   void testConstructWithNonArtistThrowsInvalidArgument() {
     Python::Object none;
-    TS_ASSERT_THROWS(Artist artist(none), std::invalid_argument);
+    TS_ASSERT_THROWS(Artist artist(none), const std::invalid_argument &);
   }
 };
 
diff --git a/qt/widgets/mplcpp/test/AxesTest.h b/qt/widgets/mplcpp/test/AxesTest.h
index 59b001478a85ae55168262ce7c29aa23dff792d7..ce1464861647c8929a08c2f9841b0dab446c257b 100644
--- a/qt/widgets/mplcpp/test/AxesTest.h
+++ b/qt/widgets/mplcpp/test/AxesTest.h
@@ -109,19 +109,19 @@ public:
   // ----------------- failure tests ---------------------
   void testPlotThrowsWithEmptyData() {
     Axes axes(pyAxes());
-    TS_ASSERT_THROWS(axes.plot({}, {}), std::invalid_argument);
-    TS_ASSERT_THROWS(axes.plot({1}, {}), std::invalid_argument);
-    TS_ASSERT_THROWS(axes.plot({}, {1}), std::invalid_argument);
+    TS_ASSERT_THROWS(axes.plot({}, {}), const std::invalid_argument &);
+    TS_ASSERT_THROWS(axes.plot({1}, {}), const std::invalid_argument &);
+    TS_ASSERT_THROWS(axes.plot({}, {1}), const std::invalid_argument &);
   }
 
   void testSetXScaleWithUnknownScaleTypeThrows() {
     Axes axes(pyAxes());
-    TS_ASSERT_THROWS(axes.setXScale("notascaletype"), std::invalid_argument);
+    TS_ASSERT_THROWS(axes.setXScale("notascaletype"), const std::invalid_argument &);
   }
 
   void testSetYScaleWithUnknownScaleTypeThrows() {
     Axes axes(pyAxes());
-    TS_ASSERT_THROWS(axes.setYScale("notascaletype"), std::invalid_argument);
+    TS_ASSERT_THROWS(axes.setYScale("notascaletype"), const std::invalid_argument &);
   }
 
 private:
diff --git a/qt/widgets/mplcpp/test/ColormapTest.h b/qt/widgets/mplcpp/test/ColormapTest.h
index 6769a0b62cbdd1622e9bb33f82a094cb68bc797e..1bf3d6cdf5ac32df8ae3ffb26add3ad8213be1d0 100644
--- a/qt/widgets/mplcpp/test/ColormapTest.h
+++ b/qt/widgets/mplcpp/test/ColormapTest.h
@@ -46,7 +46,7 @@ public:
 
   void testConstructionWithNonColorMapObjectThrows() {
     TS_ASSERT_THROWS(Colormap cmap(MantidQt::Widgets::Common::Python::Object{}),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 };
 
diff --git a/qt/widgets/mplcpp/test/CyclerTest.h b/qt/widgets/mplcpp/test/CyclerTest.h
index aefda5455ea71751a6cc87b81e04ee0a86e040b1..038b31b0667e6f64ba9b37decce0070cc0826c86 100644
--- a/qt/widgets/mplcpp/test/CyclerTest.h
+++ b/qt/widgets/mplcpp/test/CyclerTest.h
@@ -38,7 +38,7 @@ public:
 
   void testConstructWithNonCyclerThrowsInvalidArgument() {
     Python::Object none;
-    TS_ASSERT_THROWS(Cycler cycler(none), std::invalid_argument);
+    TS_ASSERT_THROWS(Cycler cycler(none), const std::invalid_argument &);
   }
 };
 
diff --git a/qt/widgets/mplcpp/test/FigureTest.h b/qt/widgets/mplcpp/test/FigureTest.h
index ebf4dbbb9067b30efe30b7a9370116081ae2474c..b5c41fdce6c76b31ca392bc855761fdb03c1bcd9 100644
--- a/qt/widgets/mplcpp/test/FigureTest.h
+++ b/qt/widgets/mplcpp/test/FigureTest.h
@@ -68,7 +68,7 @@ public:
   // -------------------------- Failure tests ---------------------------
   void testFigureConstructedWithNonFigureThrows() {
     TS_ASSERT_THROWS(Figure fig(Python::NewRef(Py_BuildValue("(i)", 1))),
-                     std::invalid_argument);
+                     const std::invalid_argument &);
   }
 };
 
diff --git a/qt/widgets/mplcpp/test/Line2DTest.h b/qt/widgets/mplcpp/test/Line2DTest.h
index d92def49ef1e75ccf4ae5ec57b5250f0abf96bb0..66a317b1e7961cb7922e80afe09baad85f235cbc 100644
--- a/qt/widgets/mplcpp/test/Line2DTest.h
+++ b/qt/widgets/mplcpp/test/Line2DTest.h
@@ -37,7 +37,7 @@ public:
   // ---------------------- failure tests --------------------
   void testConstructionWithNonLine2DObjectThrowsInvalidArgument() {
     Python::Object obj{Python::NewRef(Py_BuildValue("(i)", 1))};
-    TS_ASSERT_THROWS(Line2D line(obj, {}, {}), std::invalid_argument);
+    TS_ASSERT_THROWS(Line2D line(obj, {}, {}), const std::invalid_argument &);
   }
 
 private:
diff --git a/qt/widgets/mplcpp/test/QBackendExtractTest.h b/qt/widgets/mplcpp/test/QBackendExtractTest.h
index 0544a9733b857cae02ae77522a01a0116d1cdae6..08e657f5e7201860d61410c028f652ef89cdc6c4 100644
--- a/qt/widgets/mplcpp/test/QBackendExtractTest.h
+++ b/qt/widgets/mplcpp/test/QBackendExtractTest.h
@@ -41,7 +41,7 @@ public:
     const Python::Object nonSipType{
         Python::NewRef(Py_BuildValue("(ii)", 1, 2))};
     struct Foo;
-    TS_ASSERT_THROWS(Python::extract<Foo>(nonSipType), std::runtime_error);
+    TS_ASSERT_THROWS(Python::extract<Foo>(nonSipType), const std::runtime_error &);
   }
 };
 
diff --git a/qt/widgets/sliceviewer/test/PeakPaletteTest.h b/qt/widgets/sliceviewer/test/PeakPaletteTest.h
index b1dafc85bf231cee29a38d630e0e4ee91a02aa8b..47256d1a6a9ccc7d89f1e8bec70319645788555b 100644
--- a/qt/widgets/sliceviewer/test/PeakPaletteTest.h
+++ b/qt/widgets/sliceviewer/test/PeakPaletteTest.h
@@ -46,10 +46,10 @@ public:
     PeakPalette<QColor> palette;
     TSM_ASSERT_THROWS("\n\nIndex > Max Index, should throw.\n",
                       palette.foregroundIndexToColour(indexTooHigh),
-                      std::out_of_range);
+                      const std::out_of_range &);
     TSM_ASSERT_THROWS("\n\nIndex < Max Index, should throw.\n",
                       palette.foregroundIndexToColour(indexTooLow),
-                      std::out_of_range);
+                      const std::out_of_range &);
   }
 
   void test_backgroundIndexToColour_throws_if_out_of_range() {
@@ -59,10 +59,10 @@ public:
     PeakPalette<QColor> palette;
     TSM_ASSERT_THROWS("\n\nIndex > Max Index, should throw.\n",
                       palette.backgroundIndexToColour(indexTooHigh),
-                      std::out_of_range);
+                      const std::out_of_range &);
     TSM_ASSERT_THROWS("\n\nIndex < Max Index, should throw.\n",
                       palette.backgroundIndexToColour(indexTooLow),
-                      std::out_of_range);
+                      const std::out_of_range &);
   }
 
   void test_setForgroundColour() {
@@ -118,10 +118,10 @@ public:
     PeakPalette<QColor> palette;
     TSM_ASSERT_THROWS("\n\nIndex is > Max Index. Should throw\n.",
                       palette.setForegroundColour(indexTooHigh, Qt::red),
-                      std::out_of_range);
+                      const std::out_of_range &);
     TSM_ASSERT_THROWS("\n\nIndex is < Min Index. Should throw\n",
                       palette.setForegroundColour(indexTooLow, Qt::red),
-                      std::out_of_range);
+                      const std::out_of_range &);
   }
 
   void test_setBackgroundColour_throws_if_out_of_range() {
@@ -131,10 +131,10 @@ public:
     PeakPalette<QColor> palette;
     TSM_ASSERT_THROWS("\n\nIndex is > Max Index. Should throw\n.",
                       palette.setBackgroundColour(indexTooHigh, Qt::red),
-                      std::out_of_range);
+                      const std::out_of_range &);
     TSM_ASSERT_THROWS("\n\nIndex is < Min Index. Should throw\n",
                       palette.setBackgroundColour(indexTooLow, Qt::red),
-                      std::out_of_range);
+                      const std::out_of_range &);
   }
 
   void testCopy() {