return error code = 1 if cli program throw exception