Re: Catching errors from "from" endpoints

2009-06-22 Thread Claus Ibsen
On Tue, Jun 23, 2009 at 4:04 AM, Joe Gottman wrote: > > > > Claus Ibsen-2 wrote: > > > > On Thu, Jun 18, 2009 at 2:59 PM, Joe Gottman > > wrote: > > > >> > >> Suppose I have a route that begins with something like > >> > >> from("file://c:\foo\bar") > >> > >> and I want to catch and handle

Re: Catching errors from "from" endpoints

2009-06-22 Thread Joe Gottman
Claus Ibsen-2 wrote: > > On Thu, Jun 18, 2009 at 2:59 PM, Joe Gottman > wrote: > >> >> Suppose I have a route that begins with something like >> >> from("file://c:\foo\bar") >> >> and I want to catch and handle any Exceptions thrown from this endpoint. >> Is >> there any way to do thi

Re: Catching errors from "from" endpoints

2009-06-21 Thread Claus Ibsen
But often you can just do a from(file) .onException(Exception) Or a from doTry ... doCatch(Exception) That will catch any exception occurred during routing an Exchange. On Mon, Jun 22, 2009 at 6:51 AM, Claus Ibsen wrote: > > > On Thu, Jun 18, 2009 at 2:59 PM, Joe Gottman wrote: > >> >> S

Re: Catching errors from "from" endpoints

2009-06-21 Thread Claus Ibsen
On Thu, Jun 18, 2009 at 2:59 PM, Joe Gottman wrote: > > Suppose I have a route that begins with something like > > from("file://c:\foo\bar") > > and I want to catch and handle any Exceptions thrown from this endpoint. > Is > there any way to do this? I can surround a subsequent "to" in a

Catching errors from "from" endpoints

2009-06-18 Thread Joe Gottman
Suppose I have a route that begins with something like from("file://c:\foo\bar") and I want to catch and handle any Exceptions thrown from this endpoint. Is there any way to do this? I can surround a subsequent "to" in a "doTry" ... "doCatch" block, but there doesn't seem to be any