EddyRivasLab / hmmer

HMMER: biological sequence analysis using profile HMMs
http://hmmer.org
Other
305 stars 69 forks source link

Returns error code when status is unset #312

Closed nawrockie closed 11 months ago

nawrockie commented 11 months ago

Several places in read_asc{2,3}0hmm were returning status when it was unset upon an error. Fix is to return eslEFORMAT. This is proposed to address issue #311

cryptogenomicon commented 11 months ago

Agreed, and I will make some additional fixes to error handling in both functions after accepting the PR. The read_asc{2,3}0hmm functions should be more clearly returning eslEFORMAT whenever esl_fileparser functions fail to get data (premature eslEOL and eslEOF errors from esl_fileparser_GetTokenOnLine() and esl_fileparser_NextLine()). They do, but it's a little obscure how they're doing it - they convert the status code to eslEFORMAT in the ERROR: block, which can be confusing. (Confused me, anyway.)