Error handling end exit codes in GATK
I have a question regarding the error handling of GATK. Is GATK always returning a 0 exit status?
For example one of my bam files seems to be malformated, so the Haplotypecaller reports an error and stops.
So I was expecting my whole script to stop as I always check the return status $? in shell.
But it reports as "0", meaning my scripts goes on. Is there a way to catch these errors?
EDIT: I just noticed my pipeline was configured to use an old version of GATK.
With 3.6-0 it seems to be working. Sorry for the confusion.