add exit_code and output into ErrorCode exception