Changeset 3162
- Timestamp:
- Jan 15, 2014, 9:01:08 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/bam.cc
r3160 r3162 210 210 211 211 212 void test_write(test::Suite& suite, const BamHeader& header) 213 { 214 OutBamFile out; 215 BamRead read; 216 try { 217 // trying to write to a file not open 218 out.write(read); 219 suite.add(false); 220 suite.err() << "write(BamRead): did not throw\n"; 221 } 222 catch (utility::runtime_error& e) { 223 suite.err() << "expected exception: " << e.what() << "\n"; 224 } 225 } 226 227 212 228 void test1(test::Suite& suite) 213 229 { … … 258 274 test_name(suite, bam); 259 275 test_open3(suite, in.header()); 260 } 261 #endif 276 test_write(suite, in.header()); 277 } 278 #endif -
trunk/yat/omic/BamFile.cc
r3160 r3162 162 162 void OutBamFile::write(const BamRead& read) 163 163 { 164 if ( !samwrite(sf_, read.bam_)) {164 if (samwrite(sf_, read.bam_)<=0) { 165 165 // FIXME if wanted perhaps we should throw an OutBamFile::error 166 166 // instead that can hold \a read
Note: See TracChangeset
for help on using the changeset viewer.