mercredi 1 avril 2015

Exception Handling Strategy in three tier architecture project

I have a three tire architecture rest application in Java,Spring,Hibernate what should be my exception handling strategy. 1)should i use my own custom Runtime exception class or compile time exception. 2)Is it good to wrap the exceptions into a custom Runtime exception. 3)suppose in a scenario where i have a DAO Exception coming to my Dto layer should i handle it again converting it into a Dto exception or should throw the same exception to my business service. 4)Should i use @Exception annotation for handling exception in my Controller.


please suggest me the best exception handling strategy to follow.


Aucun commentaire:

Enregistrer un commentaire