We've avoided this extra level of complexity and kept our code much cleaner by simply allowing exceptions to be thrown.
通过允许抛出异常,我们已避免了这种杂乱所产生的额外复杂性,并使代码保持更“整洁”。
The handler is not required to perform any action, and your code should avoid generating exceptions or allowing exceptions to propagate to the calling method.
处理程序不需要执行任何操作,您的代码应避免产生异常或允许异常传播到调用方法。
Thankfully, Scala treats exception handling as just another pattern match, allowing us to make smart choices when presented with a multiplicity of potential exceptions. Let's see this in action.
感谢scala实际上把异常处理作为了另外一种模式匹配,允许我们在遇到多样化的异常时能做出更聪明的决定。
The problem with allowing the servlet container to handle exceptions is that it severely limits what can be displayed on the resulting error page and makes transactional rollbacks all but impossible.
允许servlet容器处理异常的问题在于,这严重限制了错误页面上显示的内容,并且禁止了事务回滚。
Allowing unhandled exceptions in threads to proceed naturally, until the operating system terminates the program, exposes such problems during development and testing.
如果允许线程中的未经处理的异常正常继续,直到操作系统终止程序为止,将会在开发和测试过程中暴露此问题。
Appropriate levels of automation reduce the routine demands on your staff allowing them to proactively focus on exceptions to the plan.
自动化适用等级减少了对员工的常规要求,使他们积极关注该计划的例外情况。
Appropriate levels of automation reduce the routine demands on your staff allowing them to proactively focus on exceptions to the plan.
自动化适用等级减少了对员工的常规要求,使他们积极关注该计划的例外情况。
应用推荐