Exception catching and System Operations

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

Exception catching and System Operations

Rodrigo Ojeda
Hi guys:

I have two questions for you:

1.- I want to know if there is a way to catch exceptions in the
pipeline, specially on the email procesor (if I send an email with a non
existing address orbeon throws a page with an exception) and,

2.- Is there a way to perform system operations like mkdir, cp, rm...?

Regards!
--
Don't try to bend the spoon, that's impossible. Instead, only try to
realize the truth.
-What truth?-
There is no spoon.
-There is no spoon?-
Then you'll see that it's not the spoon that bends, it is only yourself.




--
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: Exception catching and System Operations

Erik Bruchez
Administrator
Rodrigo,

> 1.- I want to know if there is a way to catch exceptions in the
> pipeline, specially on the email procesor (if I send an email with a non
> existing address orbeon throws a page with an exception) and,

XPL doesn't have a try/catch mechanism yet. Once we implement XProc,
we'll have that (no ETA though).

We have oxf:exception-catcher processor, but unfortunately this only
works if you read a processor output. The email processor doesn't have
any output, so it won't work in this case.

Now if you are using XForms and you call a pipeline from an XForms
submission, and that pipeline uses the email processor, from XForms you
are informed that an error occurred during the submission. This could be
good enough in certain scenarios.

There was also the suggestion in the past to allow the email processor
to have an error output instead of throwing exceptions, but we haven't
implemented that as we were hoping to have exception handling "soon".

> 2.- Is there a way to perform system operations like mkdir, cp, rm...?

We have an oxf:file-processor (now I wonder why this is not simply
oxf:file) which currently only implements "rm":

   http://www.orbeon.com/ops/doc/processors-other#file-processor

The idea was that as users need more file-related functionality, this
processor would be enhanced. So that would be the place to do it, or you
can perform these operations directly using the oxf:java processor.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Exception catching and System Operations

Erik Bruchez
Administrator
I forgot to add that we also have an oxf:execute-processor (should be
oxf:execute as well) which allows you to call external commands, pass
input to them and retrieve their output. For this one, the documentation
is the Java code at the moment:

   org.orbeon.oxf.processor.execute.ExecuteProcessor.java

-Erik

Erik Bruchez wrote:

> Rodrigo,
>
>> 1.- I want to know if there is a way to catch exceptions in the
>> pipeline, specially on the email procesor (if I send an email with a non
>> existing address orbeon throws a page with an exception) and,
>
> XPL doesn't have a try/catch mechanism yet. Once we implement XProc,
> we'll have that (no ETA though).
>
> We have oxf:exception-catcher processor, but unfortunately this only
> works if you read a processor output. The email processor doesn't have
> any output, so it won't work in this case.
>
> Now if you are using XForms and you call a pipeline from an XForms
> submission, and that pipeline uses the email processor, from XForms you
> are informed that an error occurred during the submission. This could be
> good enough in certain scenarios.
>
> There was also the suggestion in the past to allow the email processor
> to have an error output instead of throwing exceptions, but we haven't
> implemented that as we were hoping to have exception handling "soon".
>
>> 2.- Is there a way to perform system operations like mkdir, cp, rm...?
>
> We have an oxf:file-processor (now I wonder why this is not simply
> oxf:file) which currently only implements "rm":
>
>   http://www.orbeon.com/ops/doc/processors-other#file-processor
>
> The idea was that as users need more file-related functionality, this
> processor would be enhanced. So that would be the place to do it, or you
> can perform these operations directly using the oxf:java processor.
>
> -Erik
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Exception catching and System Operations

Rodrigo Ojeda
Thank you Erik!
Let's play with the java proc >=)

Regards!

On Wed, 2007-06-27 at 13:09 +0200, Erik Bruchez wrote:

> I forgot to add that we also have an oxf:execute-processor (should be
> oxf:execute as well) which allows you to call external commands, pass
> input to them and retrieve their output. For this one, the documentation
> is the Java code at the moment:
>
>    org.orbeon.oxf.processor.execute.ExecuteProcessor.java
>
> -Erik
>
> Erik Bruchez wrote:
> > Rodrigo,
> >
> >> 1.- I want to know if there is a way to catch exceptions in the
> >> pipeline, specially on the email procesor (if I send an email with a non
> >> existing address orbeon throws a page with an exception) and,
> >
> > XPL doesn't have a try/catch mechanism yet. Once we implement XProc,
> > we'll have that (no ETA though).
> >
> > We have oxf:exception-catcher processor, but unfortunately this only
> > works if you read a processor output. The email processor doesn't have
> > any output, so it won't work in this case.
> >
> > Now if you are using XForms and you call a pipeline from an XForms
> > submission, and that pipeline uses the email processor, from XForms you
> > are informed that an error occurred during the submission. This could be
> > good enough in certain scenarios.
> >
> > There was also the suggestion in the past to allow the email processor
> > to have an error output instead of throwing exceptions, but we haven't
> > implemented that as we were hoping to have exception handling "soon".
> >
> >> 2.- Is there a way to perform system operations like mkdir, cp, rm...?
> >
> > We have an oxf:file-processor (now I wonder why this is not simply
> > oxf:file) which currently only implements "rm":
> >
> >   http://www.orbeon.com/ops/doc/processors-other#file-processor
> >
> > The idea was that as users need more file-related functionality, this
> > processor would be enhanced. So that would be the place to do it, or you
> > can perform these operations directly using the oxf:java processor.
> >
> > -Erik
> >
>
>
> plain text document attachment (message-footer.txt)
> --
> 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
--
Don't try to bend the spoon, that's impossible. Instead, only try to
realize the truth.
-What truth?-
There is no spoon.
-There is no spoon?-
Then you'll see that it's not the spoon that bends, it is only yourself.




--
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