Changeset 18144 for trunk/Mars/mdrs/MDrsCalibrationTime.cc
- Timestamp:
- 02/18/15 12:07:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mdrs/MDrsCalibrationTime.cc
r18123 r18144 51 51 bool MDrsCalibrationTime::ReadFits(const string &fname) 52 52 { 53 const std::string msg = DrsCalibrateTime::ReadFitsImp(fname); 53 string msg; 54 try 55 { 56 msg = DrsCalibrateTime::ReadFitsImp(fname); 57 } 58 catch (const exception &e) 59 { 60 msg = e.what(); 61 } 62 54 63 if (msg.empty()) 55 64 { 56 *fLog << inf << " WroteDRS calibration file " << fname << endl;57 return kTRUE;65 *fLog << inf << "Read DRS calibration file " << fname << endl; 66 return true; 58 67 } 59 68 60 *fLog << err << "Error writing to" << fname << ": " << msg << endl;61 return kFALSE;69 *fLog << err << "Error reading from " << fname << ": " << msg << endl; 70 return false; 62 71 } 63 72 … … 68 77 { 69 78 *fLog << err << "File '" << fname << "' already exists." << endl; 70 return kFALSE;79 return false; 71 80 } 72 81 73 const std::string msg = DrsCalibrateTime::WriteFitsImp(fname); 82 string msg; 83 try 84 { 85 msg = DrsCalibrateTime::WriteFitsImp(fname); 86 } 87 catch (const exception &e) 88 { 89 msg = e.what(); 90 } 91 74 92 if (msg.empty()) 75 93 { 76 94 *fLog << inf << "Wrote DRS calibration file " << fname << endl; 77 return kTRUE;95 return true; 78 96 } 79 97 80 98 *fLog << err << "Error writing to " << fname << ": " << msg << endl; 81 return kFALSE;99 return false; 82 100 }
Note:
See TracChangeset
for help on using the changeset viewer.