Good news and bad news I guess. The good news is that I identified
all the components that are wrapping the call to performParentAction()
with a "swallowing" exception handler. I modified them all to extend
my base component (MPVWOComponent). I added the performParentAction()
to MPVWOComponent. Then I set a break point. It gets called a couple
of times but never from the swallowers. In other words, none of the
swallowers are participating in the action.
So even though the performParentAction in WOComponent changes the
current component and then calls pushValuesToParent() and
pullValuesFromParent() without wrapping them in an exception handler,
I don't think that is the problem in my case.
So my new theory is that there is a swallower somewhere else that
calls some portion of code (ours or WO's) that changes the current
component and an exception is thrown without restoring the current
context and then the exception swallower hides the problem.
Sigh... LIfe is not easy sometimes!! :-)
On Jun 26, 2009, at 12:12 PM, Ricardo J. Parada wrote:
Wow... I did a search through all our projects for places where we
call performParentAction() and I found a whole bunch of component
that are catching and swallowing like this:
try {
String s = (String) valueForBinding("parentAction");
if (s != null) {
performParentAction(s);
}
} catch (Exception e) {
session.addUserMessagesFromException(e);
return null;
}
Bad huh? :-)
I'm changing all of these to extend the base class MPVWOComponent
and then I should know which is getting the exception and what it is!
On Jun 26, 2009, at 11:49 AM, Ricardo J. Parada wrote:
On Jun 26, 2009, at 11:39 AM, Mike Schrag wrote:
You are right... Good idea... but it may be challenging as the
performParentAction() calls an action in a parent component and
then that component also calls performParentAction()... and it's
a long chain. So I need to look at all of them to find out...
Hey, I did not write those components hehehe... but it's clear to
me it is overly complex from the way I usually do things in
WebObjects. And it's one of legacy components which seems to be
screaming for re-design. :-)
Thanks for the suggestions.. I'll try them to find out WHERE and
WHY...
The deep call trace is why i suggest putting a try/catch in your
base component's performParentAction -- so all your components
have to pass through yours ... SOMEONE in that chain is going to
throw out -- it's required for this to fail. If it DOESN'T, then
there's something else going on.
Yep... working on this... I'm first making sure all the components
extend my base class MPVWOComponent (who is a subclass of
ERXComponent).
then I'll put the performParentAction() in MPVWOComponent to try to
catch the exception assuming it's happening.
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]