一种被广泛采用的失败处理机制是异常处理,包括捕获并记录错误,以及在失败发生时选择一个备选执行路径。
A widely adopted mechanism for dealing with failures is exception handling, encompassing both capturing and logging the error and choosing an alternative execution path in the case of failures.
一个需要动态流程选择的出色场景示例是,根据遇到的错误类型调用不同的异常处理流程。
A good example of a scenario where dynamic process selection is justified is the case where different exception handling processes may be invoked depending on the type of error that is encountered.
除了少数例外情况,在可写通道或异常通道中选择这两个参数是错误的。
With few exceptions, it's a mistake to select on writeable or exceptional channels.
应用推荐