开发者

How do I catch the exception in windows application in c#?

开发者 https://www.devze.com 2022-12-22 09:15 出处:网络
Where should we catch exception In Layer Boundary (UI->BLL & BLL->DAL) In that methods where there is no interaction between Layers only some business logic p开发者_开发知识库resent
  1. Where should we catch exception

    • In Layer Boundary (UI->BLL & BLL->DAL)
    • In that methods where there is no interaction between Layers only some business logic p开发者_开发知识库resent

  2. How do I write exception in Save/Delete where some DML statement executing?

    • What should I write in DAL end?
    • What should I write in BLL end?
    • What should I write in UI end?

  3. In Get/Load method How do we handle exception

    • What should I write in BLL end?
    • What should I write in UI end?

  4. Should I catch System exception?


The general rule with exception handling is: only handle exceptions your layer will be able to deal with. If you can't, let the higher ones handle it.

0

精彩评论

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