Re: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-05 Thread Navjot Singh
ts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2003 5:02 PM Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture > Generally, returning null when it should be an error is considered bad > practice. (If null is a valid return value of cour

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread David Graham
m: "Erica Leung" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture Date: Thu, 3 Apr 2003 11:37:58 -08

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Erica Leung
: "Erica Leung" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture >Date: Thu, 3 Apr

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread David Graham
CTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture Date: Thu, 3 Apr 2003 11:08:56 -0800 Since you guys are having a go

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Erica Leung
MAIL PROTECTED] Sent: Thursday, April 03, 2003 3:33 AM To: Struts Users Mailing List Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture Generally, returning null when it should be an error is considered bad practice. (If null is a valid return value of course thats a differ

Re: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Navjot Singh
rsday, April 03, 2003 5:02 PM Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architecture | Generally, returning null when it should be an error is considered bad | practice. (If null is a valid return value of course thats a different | matter). | In this case you should throw an

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Andrew Hill
, 3 April 2003 18:53 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Where to catch/throw Exceptions in Struts Tiered Architecture hi andrew, but surely these long stacktraces are not meant for users ;-) what i have got from your statement is something like this SQLException

Re: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Navjot Singh
thanks gareth, i got the point. thanks to Ted (Tip 15) and Andrew as well. -navjot - Original Message - From: "Gareth Andrew" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2003 4:09 PM Subject: Re: Wh

Re: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Navjot Singh
i am ignoring? regards Navjot Singh - Original Message - From: "Andrew Hill" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2003 3:49 PM Subject: RE: Where to catch/throw Exceptions in Struts Tiered Architec

Re: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Gareth Andrew
IMO, catch the database exception in user, then throw a new (wrapped) exception, catch it in UserAction and throw a new exception, and use struts decalritive exception handling features to handle it. This avoids undue coupling between UserAction, User and Database. Gareth. Navjot Singh wrote:

RE: Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Andrew Hill
: Struts Users List Subject: Where to catch/throw Exceptions in Struts Tiered Architecture Hi, Take a simple case. Action Y UserAction -> User -> Database | V user.jsp Say, Database throws exception. What is best way to handle exception? 1. Catch in User class and

Where to catch/throw Exceptions in Struts Tiered Architecture

2003-04-03 Thread Navjot Singh
Hi, Take a simple case. Action Y UserAction -> User -> Database | V user.jsp Say, Database throws exception. What is best way to handle exception? 1. Catch in User class and return NULL / some ErrorObject to UserAction and let UserAction decide how to handle it? 2. Let Us