Ignore:
Timestamp:
Feb 4, 2013, 2:10:14 PM (9 years ago)
Author:
Peter
Message:

fixes #751. throw if OutBamFile::write fails

File:
1 edited

Legend:

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

    r2943 r2983  
    11// $Id$
    22//
    3 // Copyright (C) 2012 Peter Johansson
     3// Copyright (C) 2012, 2013 Peter Johansson
    44//
    55// This program is free software; you can redistribute it and/or modify
     
    131131  void OutBamFile::write(const BamRead& read)
    132132  {
    133     samwrite(sf_, read.bam_);
     133    if (!samwrite(sf_, read.bam_)) {
     134      // FIXME if wanted perhaps we should throw an OutBamFile::error
     135      // instead that can hold \a read
     136      throw utility::runtime_error("OutBamFile::write failed");
     137    }
    134138  }
    135139
Note: See TracChangeset for help on using the changeset viewer.