Changeset 3166
- Timestamp:
- Jan 17, 2014, 3:23:05 AM (9 years ago)
- Location:
- trunk/yat/omic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/omic/BamFile.cc
r3162 r3166 163 163 { 164 164 if (samwrite(sf_, read.bam_)<=0) { 165 // FIXME if wanted perhaps we should throw an OutBamFile::error 166 // instead that can hold \a read 167 throw utility::runtime_error("OutBamFile::write failed"); 165 throw OutBamFile::error(read); 168 166 } 169 167 } 170 168 169 170 // OutBamFile::error 171 172 OutBamFile::error::error(const BamRead& r) 173 : IO_error(""), read_(r) {} 174 175 176 OutBamFile::error::~error(void) throw() {} 177 178 179 const BamRead& OutBamFile::error::read(void) const 180 { return read_; } 181 171 182 }}} -
trunk/yat/omic/BamFile.h
r3160 r3166 235 235 \brief write a read to output file 236 236 237 \throw utility::runtime_error if write failed 237 \throw OutBamFile::error if write failed 238 239 \since yat 0.12 238 240 */ 239 241 void write(const BamRead& read); 242 243 /** 244 \brief Error thrown from OutBamFile::write(const BamRead&) at failure 245 */ 246 class error : public utility::IO_error 247 { 248 public: 249 /// \brief Constructor 250 error(const BamRead&); 251 /// \brief Destructor 252 // has to be throw() since base class destructor is 253 virtual ~error(void) throw(); 254 /** 255 \return bam read that failed 256 */ 257 const BamRead& read(void) const; 258 private: 259 BamRead read_; 260 }; // end of class error 261 240 262 private: 241 263 };
Note: See TracChangeset
for help on using the changeset viewer.