Throw exceptions for non-zero exit codes.