Can I catch an "raise error" with an error handler?

826 views
Skip to first unread message

jornica

unread,
Feb 9, 2010, 5:33:09 AM2/9/10
to Oracle Service Bus
- Short description: Can I catch an "raise error" with an error
handler?

- Long description: We have a proxy service and based on some
criteria, further processing doesn't make sense. To stop processing we
add an raise error to the pipeline. On the proxy service level we add
an error handler. Our error should be catched there and a custom made
reply message is constructed.

Here are the steps to reproduce the behaviour:
1 We have a very simple proxy service (no business service yet, just a
simple echo, to demonstrate the behaviour)
2 The flow starts with a operational branch.
3 In the default branche a pipeline pair is added.
4 In the request pipeline a stage is added.
5 In this stage a raise error is added.
An errorhandler is added to the proxy serice, and a assign is added to
the errorhandler (the variabele errorCode is set to 1).
When we test this in the testconsole, we see the error is raised, the
"Service Error Handler" and the "System Error Handler" are called;
there is no trace of calling the assignment however.

Our assumption was that the raise error is catched by the error
handler but it looks like the error handler is not touched by raise
error. Is this intended behaviour by design?

With kind regards,

Jornica


Jeff

unread,
Feb 10, 2010, 10:57:08 AM2/10/10
to Oracle Service Bus
Yes, you can catch an error that you raise with an error handler. Can
you post a screenshot of the messageflow? I'll try to reproduce the
flow as you've described it later today.

- Jeff

David Schorow

unread,
Feb 11, 2010, 12:32:06 AM2/11/10
to oracle-se...@googlegroups.com, jor...@gmail.com
If anything, I'm guessing that might be an issue with tracing, but that the
work in the error handler is indeed happening.

One hint about error handlers is that if you don't do anything special in
your error handler (like a reply or continue action), the error will be
reraised at the end of the error handler. I'm guessing that is why you are
seeing the System Error Handler getting invoked.

Try putting a log action into your error handler to log the value of the
variable that is the target of the assign.

David

> --
> You received this message because you are subscribed to the Google Groups
> "Oracle Service Bus" group.
> To post to this group, send email to oracle-se...@googlegroups.com.
> To unsubscribe from this group, send email to
> oracle-service-...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/oracle-service-bus?hl=en.
>


jornica

unread,
Feb 11, 2010, 4:26:48 PM2/11/10
to Oracle Service Bus
Received an email from David Schorow with the following hint:
--

If anything, I'm guessing that might be an issue with tracing, but
that the work in the error handler is indeed happening.

One hint about error handlers is that if you don't do anything special
in your error handler (like a reply or continue action), the error
will be reraised at the end of the error handler. I'm guessing that
is why you are seeing the System Error Handler getting invoked.

--

After adding a reply message to the error handler, it worked as
expected.

With kind regards,

Jornica

Reply all
Reply to author
Forward
0 new messages