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
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
: "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
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
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
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
, 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
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
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
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:
: 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
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
12 matches
Mail list logo