Hi,

If you just want to send a String back the client when the exception is thrown, 
you can just create a method as toResultString in the ProcessError Object.
And it could be used with the ErrorHandler.

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang



On Friday, October 19, 2012 at 3:17 PM, snowindy wrote:

> ProcessError is simply a utility class containing both exception caught in a
> certain stage, and a Stage identifier. Stage id will be used afterwards to
> identify stage with no pain with string parsing etc. I'll check what is
> ErrorHandler.
> 
> This is the code for ProcessError:
> 
> 
> *public class ProcessError implements Serializable {
> private static final long serialVersionUID = -4937490917272427102L;
> 
> private SendServiceCatalogStage stage;
> private Throwable stageException;
> 
> public ProcessError(SendServiceCatalogStage stage, Throwable
> stageException) {
> this.stage = stage;
> this.stageException = stageException;
> }
> 
> public SendServiceCatalogStage getStage() {
> return stage;
> }
> 
> public Throwable getStageException() {
> return stageException;
> }
> 
> @Override
> public String toString() {
> return "ProcessError [stage=" + stage + ", stageException="
> + stageException != null ? stageException.getMessage() : null
> + "]";
> }
> }*
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-application-design-question-tp5721248p5721275.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to