dcsimg
Struts Exception Handling Desing
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pamir_sonmez
Posted On:   Monday, July 26, 2010 03:55 AM

I wonder, what is the correct way of exception handling in the MVC design? For example, in the project I have a method name myFunc() in DAO interface and implemantation, and in service interface and implementation I hava this method. And from a jsp as I call an action method, in action class I call the method,moreover. So I have 3 places to catch the exception, MyClassDaoImp.java MyClassServiceImp.java MyClassAction.java I think that, it is better programming style to catch the errors at same place. I mean I caught IO exception at service class and I caught database exception at dao class seem as if a wrong programming style. Shortly, how should I hande exception    More>>

I wonder, what is the correct way of exception handling in the MVC design?
For example, in the project I have a method name myFunc()

in DAO interface and implemantation, and in service interface and implementation I hava this method.
And from a jsp as I call an action method, in action class I call the method,moreover.

So I have 3 places to catch the exception,
MyClassDaoImp.java
MyClassServiceImp.java
MyClassAction.java

I think that, it is better programming style to catch the errors at same place.
I mean I caught IO exception at service class and I caught database exception at dao class seem as if a wrong programming style.

Shortly, how should I hande exception
Any comment or link is appreciated.

Thanks

   <<Less
About | Sitemap | Contact