Hi, Raymond:

Thanks for your confirmation. I will do that when I back to work tomorrow.

Regards,
Yang Sun


2007/9/21, Raymond Feng <[EMAIL PROTECTED]>:
>
> Hi, Sun.
>
> Welcome to Tuscany and thank you for reporting this issue. I think you
> found
> a bug here. Would you please open a JIRA
> (https://issues.apache.org/jira/browse/TUSCANY) so that it can be tracked
> and fixed?
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Sun Yang" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, September 21, 2007 1:47 AM
> Subject: How to get more detailed exception information from a Spring
> implementation?
>
>
> > Hi,
> >
> > I am a new user of Tuscany and I am very excited with this great
> software.
> > I
> > am trying to introduce it into my project and currently I am evaluate it
> > with every possible situations.
> > Currently, I met a small problem with the spring implementation. I am
> not
> > sure if I understand the background and configure the composites right.
> > Please correct me if I make anything wrong.
> > The problem I met is that I cannot get the detailed original exception
> > when
> > the server-side throw any kinds of exceptions. After a rough looking at
> > the
> > src code and debugging, I see the following code in SpringInvoker.java:
> > -----------------------------------------------------------------------
> >    private Object doInvoke(Object payload) throws
> > SpringInvocationException
> > {
> >        if (theMethod == null)
> >            setupMethod();
> >
> >        if (badInvoker)
> >            throw new SpringInvocationException("Spring invoker
> incorrectly
> > configured");
> >        // Invoke the method on the Spring bean using the payload,
> > returning
> > the results
> >        try {
> >            Object ret;
> >
> >            if (payload != null && !payload.getClass().isArray()) {
> >                ret = theMethod.invoke(bean, payload);
> >            } else {
> >                ret = theMethod.invoke(bean, (Object[])payload);
> >            }
> >            return ret;
> >        } catch (InvocationTargetException e) {
> >            throw new SpringInvocationException(e.getMessage());
> >        } catch (Exception e) {
> >            throw new SpringInvocationException(e.getMessage());
> >        }
> >
> >    } // end method doInvoke
> > ------------------------------------------------------------------------
> > When the invoked method throw an exception (checked or unchecked), the
> > program flow will go to the InvocationTargetException exception handler.
> > Then the program only put the message of the original message to the
> > wrapper
> > exception SpringInvocationException. The detailed information of the
> > original exception is missing. I am thinking it is here that will lost
> the
> > detailed information of the original exception detail.
> >
> > The reason for me to bring this question is that if we cannot get the
> > detailed information of the original exception, how can we deal with the
> > application exceptions (such as NotEnoughMoneyException)? The only thing
> I
> > can get is the java.lang.reflect.InvocationTargetException wrapped in
> > java.rmi.UnexpectedException. And with those information, I cannot get
> the
> > right information to make the further decision in the program.
> >
> > I am not sure whether I got the right point or if I misunderstand
> > anything.
> > Please give me some suggestions on this problem.
> >
> > Best Regards,
> > Yang Sun
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to