Persistence API error handling

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

Persistence API error handling

Douglass Whitehead
I'm relatively new to this, so I apologize if this comes off as a noob  
Q.....

I'm using the Persistence API to read and write XML (for initial form  
load and save/submit).

In my code, if I detect an error, how do I gracefully tell Orbeon  
about it?
Is there some sort of XML structure that I should pass back to  
indicate an Error, so that Orbeon can pass the information along to  
the user?

Of course I can and will dump information into a log file, but I'd  
like to do the right thing.



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Persistence API error handling

Erik Bruchez
Administrator
Douglass,

If you are calling the service from XForms, and there is an error in
the service, the service should return an error HTTP status code. You
can detect that code using event('response-status-code') when
receiving xforms-submit-error.

-Erik

On Mon, Jul 20, 2009 at 1:29 PM, Douglass
Whitehead<[hidden email]> wrote:

> I'm relatively new to this, so I apologize if this comes off as a noob
> Q.....
>
> I'm using the Persistence API to read and write XML (for initial form load
> and save/submit).
>
> In my code, if I detect an error, how do I gracefully tell Orbeon about it?
> Is there some sort of XML structure that I should pass back to indicate an
> Error, so that Orbeon can pass the information along to the user?
>
> Of course I can and will dump information into a log file, but I'd like to
> do the right thing.
>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws