Set an non-zero exit code when an exception happend