Changeset 3079


Ignore:
Timestamp:
Sep 11, 2013, 4:29:18 AM (8 years ago)
Author:
Peter
Message:

throw if creating bam_header fails, e.g. if file is not a bam. fixes #767

File:
1 edited

Legend:

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

    r3048 r3079  
    1 
    21// $Id$
    32
     
    8281    open_base(fn, "rb", NULL);
    8382    header_.header_ = sf_->header;
    84     assert(header_.header_);
     83    if (header_.header_ == NULL) {
     84      std::ostringstream ss;
     85      ss << "failed to read header from '" << filename() << "'";
     86      throw utility::runtime_error(ss.str());
     87    }
    8588  }
    8689
Note: See TracChangeset for help on using the changeset viewer.