zavolanlab / htsinfer

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

Unexpected errors throw same status code as warnings #144

Closed uniqueg closed 10 months ago

uniqueg commented 10 months 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.