Error Message

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Message

Peymirat Damien
Hi all,


   When OPS return an Error Message, Is it possible to use this Error
Message ??

For example, when I try to connect to eXist database with a wrong login,
OPS tell me :

org.apache.xmlrpc.XmlRpcException: User damien unknown

I would like to use this exception to display the error on my page like
an alert for example.


Best regards

Damien.





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Error Message

Alessandro  Vernet
Administrator
Hi Damien,

Yes, you can access the error:

1) From XPL, use the exception catch processor. It reads the output of
a processor. If that processor does not generate an exception, it
works like the identity processor, otherwise it returns a document
with the exception:

<p:processor name="oxf:exception-catcher">
    <p:input name="data" href="#..."/>
    <p:output name="data" id="..."/>
</p:processor>

2) From XForms, place a handler on xforms-submit-error, and use in an
XPath expression the event('body') function. For instance:

<xforms:action ev:event="xforms-submit-error">
    <xforms:setvalue ref="..." value="event('body')"/>
</xforms:action>

Alex

On 7/28/06, Peymirat Damien <[hidden email]> wrote:

> Hi all,
>
>
>    When OPS return an Error Message, Is it possible to use this Error
> Message ??
>
> For example, when I try to connect to eXist database with a wrong login,
> OPS tell me :
>
> org.apache.xmlrpc.XmlRpcException: User damien unknown
>
> I would like to use this exception to display the error on my page like
> an alert for example.
>
>
> Best regards
>
> Damien.
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet