diff --git a/src/geo/GModelIO_MSH4.cpp b/src/geo/GModelIO_MSH4.cpp
index 54222d9a1743d934151b395a69b3b149ee6dbde6..eed1b08c2fba690c42fbfbbb8d27aa1be592194e 100644
--- a/src/geo/GModelIO_MSH4.cpp
+++ b/src/geo/GModelIO_MSH4.cpp
@@ -2851,6 +2851,7 @@ int GModel::_writePartitionedMSH4(const std::string &baseName, double version,
   bool exceptions = false;
 #pragma omp parallel for num_threads(nthreads)
   for(std::size_t part = 1; part <= getNumPartitions(); part++) {
+    if(exceptions) continue;
     std::ostringstream sstream;
     sstream << baseName << "_" << part << ".msh";
     if(getNumPartitions() > 100) {
diff --git a/src/mesh/Generator.cpp b/src/mesh/Generator.cpp
index 5f87235687ebff493d89ed9ec3982f614167e138..808fda31a776856eac5711aa4c50e27dfd895d00 100644
--- a/src/mesh/Generator.cpp
+++ b/src/mesh/Generator.cpp
@@ -383,6 +383,7 @@ static void Mesh1D(GModel *m)
     bool exceptions = false;
 #pragma omp parallel for schedule(dynamic) num_threads(nthreads)
     for(size_t K = 0; K < temp.size(); K++) {
+      if(exceptions) continue;
       int localPending = 0;
       GEdge *ed = temp[K];
       if(ed->meshStatistics.status == GEdge::PENDING) {
@@ -538,6 +539,7 @@ static void Mesh2D(GModel *m)
       temp.insert(temp.begin(), f.begin(), f.end());
 #pragma omp parallel for schedule(dynamic) num_threads(nthreads)
       for(size_t K = 0; K < temp.size(); K++) {
+        if(exceptions) continue;
         int localPending = 0;
         if(temp[K]->meshStatistics.status == GFace::PENDING) {
           backgroundMesh::current()->unset();
diff --git a/src/mesh/meshGRegionHxt.cpp b/src/mesh/meshGRegionHxt.cpp
index f45064bf0cfc3bdd18f39235514e75790bd01335..7030a4cdda0f7c120b6eca0e8bec83de2aeec569 100644
--- a/src/mesh/meshGRegionHxt.cpp
+++ b/src/mesh/meshGRegionHxt.cpp
@@ -59,6 +59,7 @@ static HXTStatus nodalSizesCallBack(double *pts, uint32_t *volume,
   bool exceptions = false;
 #pragma omp parallel for schedule(dynamic) num_threads(nthreads)
   for(size_t i = 0; i < numPts; i++) {
+    if(exceptions) continue;
     if(volume[i] < 0 || volume[i] >= allGR->size()) {
       Msg::Error("Invalid volume tag %d in mesh size calculation", volume[i]);
       continue;