Index: /trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4540)
+++ /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4541)
@@ -195,26 +195,37 @@
   // Loop over all Epochs
   // --------------------
-  while ( (_currEpo = obsFile->nextEpoch()) != 0) {
-
-    // Loop over all satellites
-    // ------------------------
-    for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
-      const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
-      t_obs obs;
-      t_postProcessing::setObsFromRnx(obsFile, _currEpo, rnxSat, obs);
-
-      if (obs.satSys == 'R') {
-        continue; // TODO: set channel number
-      }
-
-      QString prn = QString("%1%2").arg(obs.satSys)
-                                   .arg(obs.satNum, 2, 10, QChar('0'));
-
-      t_satStat& satStat = _satStat[prn];
-
-      satStat.addObs(obs);
-    }
-
-  } // while (_currEpo)
+  try {
+    while ( (_currEpo = obsFile->nextEpoch()) != 0) {
+  
+      // Loop over all satellites
+      // ------------------------
+      for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
+        const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
+        t_obs obs;
+        t_postProcessing::setObsFromRnx(obsFile, _currEpo, rnxSat, obs);
+  
+        if (obs.satSys == 'R') {
+          continue; // TODO: set channel number
+        }
+  
+        QString prn = QString("%1%2").arg(obs.satSys)
+                                     .arg(obs.satNum, 2, 10, QChar('0'));
+  
+        t_satStat& satStat = _satStat[prn];
+  
+        satStat.addObs(obs);
+      }
+  
+    } // while (_currEpo)
+  }
+  catch (QString str) {
+    if (_log) {
+      *_log << "Exception " << str << endl;
+    }
+    else {
+      qDebug() << str;    
+    }
+    return;
+  }
 
   // Analyze the Multipath
Index: /trunk/BNC/src/rinex/reqcedit.cpp
===================================================================
--- /trunk/BNC/src/rinex/reqcedit.cpp	(revision 4540)
+++ /trunk/BNC/src/rinex/reqcedit.cpp	(revision 4541)
@@ -254,20 +254,31 @@
     }
     t_rnxObsFile::t_rnxEpo* epo = 0;
-    while ( (epo = obsFile->nextEpoch()) != 0) {
-      if (_begTime.valid() && epo->tt < _begTime) {
-        continue;
-      }
-      if (_endTime.valid() && epo->tt > _endTime) {
-        break;
-      }
-    
-      if (_samplingRate == 0 || 
-          fmod(round(epo->tt.gpssec()), _samplingRate) == 0) {
-        applyLLI(obsFile, epo);
-        outObsFile.writeEpoch(epo);
+    try {
+      while ( (epo = obsFile->nextEpoch()) != 0) {
+        if (_begTime.valid() && epo->tt < _begTime) {
+          continue;
+        }
+        if (_endTime.valid() && epo->tt > _endTime) {
+          break;
+        }
+      
+        if (_samplingRate == 0 || 
+            fmod(round(epo->tt.gpssec()), _samplingRate) == 0) {
+          applyLLI(obsFile, epo);
+          outObsFile.writeEpoch(epo);
+        }
+        else {
+          rememberLLI(obsFile, epo);
+        }
+      }
+    }
+    catch (QString str) {
+      if (_log) {
+        *_log << "Exception " << str << endl;
       }
       else {
-        rememberLLI(obsFile, epo);
-      }
+        qDebug() << str;    
+      }
+      return;
     }
   }
