Treatment of exceptions in Orbeon

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

Treatment of exceptions in Orbeon

inigo10rodri
Hi,

We are developing the treatment of exceptions that are given in the back-end
code. We need to know if for the messages of those exceptions to be shown in
Orbeon, some kind of specific configuration is needed.

How are they treated? How do we show them? It has any specific format?

(This last question is, because perhaps for the messages shown in Orbeon, it
is necessary to send from the exceptions some specific format, a string, a
code or another thing)

Thank you very much,

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

Alessandro  Vernet
Administrator
Hi Iñigo,

Are you referring to exceptions showing in the `orbeon.log`? They go through
Log4j, so you can configure a few things in the
`WEB-INF/resources/config/log4j.xml`. In addition to this you there are
properties you can set to define what you'd like the XForms engine to log
(see link below). You'll let me know if this works for you.

https://doc.orbeon.com/configuration/advanced/xforms-logging

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

Alessandro  Vernet
Administrator
Hi Iñigo, did you found a way to log what you wanted to, in a format that
works for you?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

inigo10rodri
Hi Alex,

Thanks for your reply and sorry for my delay. What I want is to set my own
exception messages and show them in the browser.

Is that possible? I see that I can configure orbeon.log but not put my own
exceptions messages of my JAVA class.

Iñigo.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

Alessandro  Vernet
Administrator
Hi Iñigo,

Many different type of errors can happen on the server, and it is hard to
generalize error reporting to end users. You can catch errors happening when
users press a button at the bottom of the form, like Save or Submit, and
report a custom error message to users using the `error-message` action.
Would this work for the use case you have in mind, or are thinking of errors
happening a different time?

https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#success-message-and-error-message

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

inigo10rodri
Hi Alex,

It could be a solution, but we call a web service when you click on a
button, for example, the "send" button. So what we want to do is catch and
show the messages of exceptions or errors that occur within the process of
the web service that we have created.

What you are telling me is to modify the message of a process that already
exists if I have not misunderstood.

Greetings,
Iñigo



--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of exceptions in Orbeon

Alessandro  Vernet
Administrator
 Understood Iñigo. To handle this and other similar use cases we'd like to
support having actions that can return data, so you could perform different
actions depending on what is returned, extract a message from what is
returned and show it to users, and more. I've added a +1 from you on the RFE
linked below.

https://github.com/orbeon/orbeon-forms/issues/1688

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet