: [OT - Slightly] Returning Error Status from Business Layer
Jerry Jalenak wrote:
Erik -
Thanks. I'm beginning to look at ways to handle returning status using
exceptions. The idea of 'wrapping' each exception by layer is very
appealing
No problem. While exceptions are awesome, I
Jerry Jalenak wrote:
Just curious - how do most of you return errors from your business model?
Do you simply return an integer value (-1, 0. 99?) and then interpret it in
the action? Or do you return a error string that maps to something in
ApplicationResources? Any other techniques? I'm
]
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]
Sent: Monday, August 11, 2003 10:29 AM
To: Struts Users Mailing List
Subject: Re: [OT - Slightly] Returning Error Status from Business Layer
Jerry Jalenak wrote:
Erik, David, and Mike -
Thanks for the replies - interesting
Mailing List
Subject: Re: [OT - Slightly] Returning Error Status from Business Layer
Jerry Jalenak wrote:
Erik,
You're right - I asked the wrong question (how to return error and not how
to return status), so thanks for sticking with me on this thread. I've
started looking at the Type-Safe
Jerry Jalenak wrote:
I have an order screen where a client can, well, order one or more items.
The struts action picks up the item number and hands it off to a business
class. The business class goes to the database (DAO), and based on what
comes back, either returns a JavaBean containing the
Jerry Jalenak wrote:
Erik -
Thanks. I'm beginning to look at ways to handle returning status using
exceptions. The idea of 'wrapping' each exception by layer is very
appealing
No problem. While exceptions are awesome, I don't want to give the
impression that they should be used for
Jerry Jalenak wrote:
Erik, David, and Mike -
Thanks for the replies - interesting to note that all three of you suggested
basically the same answer, that of using the exception mechanism.
I think it's just that one of the cool things about Java over PHP or C
is that we have exceptions, and
--- Erik Price [EMAIL PROTECTED] wrote:
Jerry Jalenak wrote:
Just curious - how do most of you return errors from your business
model?
Do you simply return an integer value (-1, 0. 99?) and then interpret
it in
the action?
Yuck.
Or do you return a error string that maps to
Erik Price wrote:
Side note: I like returning Object from a method -- it's rarely, rarely
necessary, and in Java, it's a pain to deal with Object instances
(because you can't send an arbitrary message to an object, you have to
make an explicit cast to appease the compiler).
Uh, mental
- Slightly] Returning Error Status from Business Layer
Jerry Jalenak wrote:
confused-look-on-face
Erik -
How then do you return a simple status from your business model to your
action? There is not an 'exceptional condition' - simply a return value
that the action can use to select
On 11/08/2003 14:03 Jerry Jalenak wrote:
Thanks for the replies - interesting to note that all three of you
suggested
basically the same answer, that of using the exception mechanism. When
implementing this, do you code individual, specific exception handlers
(i.e.
InvalidUserException, etc), or
:29 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: [OT - Slightly] Returning Error Status from Business Layer
You should look also at the declarative exception handling Struts has.
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08
Jerry Jalenak wrote:
Erik,
You're right - I asked the wrong question (how to return error and not how
to return status), so thanks for sticking with me on this thread. I've
started looking at the Type-Safe Enum pattern; except for providing a
'type-safe' construct in which to code return
You should look also at the declarative exception handling Struts has.
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 3:26 PM
To: Struts Users Mailing List
Subject: Re: [OT - Slightly] Returning Error Status from Business Layer
--- Erik
Jerry Jalenak wrote:
confused-look-on-face
Erik -
How then do you return a simple status from your business model to your
action? There is not an 'exceptional condition' - simply a return value
that the action can use to select the appropriate forward (for instance).
As I've been looking
15 matches
Mail list logo