开发者

generic container for exceptions

handling exceptions is important for code safety and to prevent undesired conditions as input for subsequent routines/algorithms. On 开发者_Go百科the other hand, tough, filling the code with try/catch/throw statements makes it less readable. Is there any programming technique that helps to avoid mixing exception handling and algorithm-related code?

Thanks,


Aspect Oriented Programming allows you to create advice's on e.g. how to handle exceptions globally.

See this MSDN Magazine article or this slideshow for more information.

AOP using Unity 2.0 is also a good example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜