虽然婚姻状况本身就是部分核心业务数据,但是其只是作为一个短代码被存储在那里。
The marital status itself is part of the core business data, but it is stored there only as a short code.
正是由于这个微妙的原因,让运行时异常成为代码要处理的外部状况是一个坏主意。
Indeed this subtlety is precisely why run-time exceptions are a bad idea for external conditions that should be handled by code.
可以用方面捕获这个功能,由于把相关代码收集在一起,而不是散落在代码基的各处,所以可以改善这种状况。
Capturing this functionality with aspects improves the situation by collecting the relevant code together, instead of it being scattered across the codebase.
应用推荐