zavolanlab / htsinfer

Infer metadata for your downstream analysis straight from your RNA-seq data
Apache License 2.0
10 stars 22 forks source link

Unexpected errors throw same status code as warnings #144

Closed uniqueg closed 1 year ago

uniqueg commented 1 year ago

Problem

HTSinfer keeps track of common errors and warnings by setting a run state. Depending on the state, after execution a status code of 2 (at least 1 error), 1 (1 or more warnings, but no errors) or 0 (no warnings or errors) is returned.

However, unexpected errors could lead to status codes of 1 being returned, making the above semantics unreliable.

Solution

Catch generic Exceptions in the tool's CLI entry point, log the error and exit with a status code of 2.