Changeset 18144 for trunk/Mars/mdrs
- Timestamp:
- 02/18/15 12:07:29 (10 years ago)
- Location:
- trunk/Mars/mdrs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mdrs/MDrsCalibration.h
r17758 r18144 30 30 } 31 31 32 bool ReadFits( TStringstr)32 bool ReadFits(const TString &str) 33 33 { 34 34 gSystem->ExpandPathName(str); 35 35 36 const std::string msg = ReadFitsImp(str.Data()); 36 string msg; 37 try 38 { 39 msg = ReadFitsImp(str.Data()); 40 } 41 catch (const exception &e) 42 { 43 msg = e.what(); 44 } 45 37 46 if (msg.empty()) 47 { 48 *fLog << inf << "Read DRS calibration file " << fname << endl; 38 49 return true; 50 } 39 51 40 *fLog << err << msg << std::endl;52 *fLog << err << "Error reading from " << fname << ": " << msg << endl; 41 53 return false; 42 54 } -
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.