diff --git a/ippl/src/Meshes/Cartesian.hpp b/ippl/src/Meshes/Cartesian.hpp
index 3008cee155e0e5ce7c2762f608ee5b3811294379..589cf2e0da15480be3a263119063985651728b07 100644
--- a/ippl/src/Meshes/Cartesian.hpp
+++ b/ippl/src/Meshes/Cartesian.hpp
@@ -28,6 +28,7 @@
 
 // include files
 #include "Utility/PAssert.h"
+#include "Utility/IpplException.h"
 #include "Utility/IpplInfo.h"
 #include "Field/BareField.h"
 #include "Field/BrickExpression.h"
@@ -995,8 +996,7 @@ storeSpacingFields(e_dim_tag* et, int vnodes)
       }
       break;
     default:
-      ERRORMSG("Cartesian::storeSpacingFields(): unknown MeshBC type" << endl);
-      break;
+        throw IpplException("Cartesian::storeSpacingFields", "unknown MeshBC type");
     }
 
     // Loop over all the LField's in the BareField's:
@@ -3325,4 +3325,4 @@ Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& x,
  * $RCSfile: Cartesian.cpp,v $   $Author: adelmann $
  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:27 $
  * IPPL_VERSION_ID: $Id: Cartesian.cpp,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $
- ***************************************************************************/
+ ***************************************************************************/
\ No newline at end of file
diff --git a/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp b/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
index f86f444a9576c9ab7ede4c170a146aa9dd1aa70f..59a9149480dc2d36f25aae981edfca54e0373550 100644
--- a/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
+++ b/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
@@ -115,7 +115,7 @@ TEST_F(VerticalFFAMagnetTest, BoundingBoxTest) {
 }
 
 TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
-    // check the field is maxwellian. This is key test for the field model 
+    // check the field is maxwellian. This is key test for the field model
     double x = length_m*0.1;
     double y = length_m*0.05;
     double z = length_m*0.8;
@@ -134,7 +134,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
         double curl = euclidean_norm(maxTest.curlB(pos, 0.));
         EXPECT_LT(abs(div), abs(divOld)) << i;
         EXPECT_LT(curl, 1e-11);
-        std::cerr << "Max Order: " << i << " |curlB|: " << curl 
+        std::cerr << "Max Order: " << i << " |curlB|: " << curl
                   << " DivB: " << div << std::endl;
         if ((i/2)*2 != i) { // div only improves on even orders
             divOld = div;
@@ -148,13 +148,13 @@ TEST_F(VerticalFFAMagnetTest, CoefficientsTest) {
     magnet_m->setMaxOrder(10);
     magnet_m->initialise();
     std::vector< std::vector<double> > coeffs = magnet_m->getDfCoefficients();
-    EXPECT_EQ(coeffs.size(), 11);
+    EXPECT_EQ(coeffs.size(), 11u);
     for (size_t i = 0; i < coeffs.size(); i++) {
         std::vector<double> cv = coeffs[i];
         if ((i/2)*2 == i) { // even
-            EXPECT_EQ(cv.size(), i+1);
+            EXPECT_EQ(cv.size(), i+1u);
         } else { // odd
-            EXPECT_EQ(cv.size(), 0);
+            EXPECT_EQ(cv.size(), 0u);
         }
     }
-}
+}
\ No newline at end of file