Ignore:
Timestamp:
Jan 17, 2014, 3:23:05 AM (8 years ago)
Author:
Peter
Message:

throw OutBamFile::error when OutBamFile::write fails. closes #778

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/BamFile.cc

    r3162 r3166  
    163163  {
    164164    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);
    168166    }
    169167  }
    170168
     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
    171182}}}
Note: See TracChangeset for help on using the changeset viewer.