Hi ,
I have a situation:
In general in a camel when we have any exception in a route the onException
is called.
for example :
onException definition:
-------------------------------
onException( MyException mye)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
SOP("got my exception");
}
});
camel route:
---------------------
from(jms:abc)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
throw new MyException();
}
});
But if i throw an exception in process block of onException it is not
getting caught in other onException defined.
for example:
got and MyException-----------
onException( MyException mye)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
// in processor block throwing mytestexception
throw new MyTestException();
}
});
I have defined onException which can handle MyTestException. But this is
not getting called :(
-------------------------------------
onException( MyTestException myte)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
SOP("got my MyTestException ");
}
});
Could please anyone let me know why it is happening??? Also how can we
achieve it.
--cheers,
atgroxx