某些派别的信徒支持使用异常来检查参数和其他的前置条件,使用错误编码来报告程序中出错的处理。
Some disciples espouse using exceptions to check parameters and other preconditions, and error codes to report processing errors within the function.
当然,我应该进行更多的错误检查,例如确保邮政编码是有效的。
Of course, I should have included more error-checking and such to make sure that the ZIP code is valid.
提供无效邮政编码的测试,并检查是否发生错误。
A test that supplies an invalid postcode and checks that a fault occurs.
应用推荐