Opened 8 years ago

Closed 8 years ago

#767 closed defect (fixed)

InBamFile::open should throw [not assert] when input is a wrong format

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.11
Component: omic Version: 0.10.1
Keywords: Cc:

Description

I tried to open a InBamFile? which was not a bam triggering this assertion

../yat-0.10.1/yat/omic/BamFile.cc:78: void theplu::yat::omic::InBamFile::open(const std::string&): Assertion `header_.header_' failed.

I think we should either remove that assertion or replace it with an exception. Compare with std::ifstream::open(1)

Change History (2)

comment:1 Changed 8 years ago by Peter

Milestone: yat 0.x+yat 0.11

I'll go with exception.

comment:2 Changed 8 years ago by Peter

Resolution: fixed
Status: newclosed

(In [3079]) throw if creating bam_header fails, e.g. if file is not a bam. fixes #767

Note: See TracTickets for help on using tickets.