Hi

You can throw any kind of exception you want. For example
NumberFormatException, IllegalArgumentException

Though there is a TypeConversionException which is maybe what you are
looking for.
But there is no rule that it must be TypeConversionException exception
thrown. You can throw what you want.

On Fri, Aug 30, 2013 at 2:24 PM, Cristiano Costantini
<cristiano.costant...@gmail.com> wrote:
> Hi all,
>
> Which Exception should I use when I can't convert something in a
> TypeConverter?
>
> I was throwing a  org.apache.camel.NoTypeConversionAvailableException,
> but this is used when no type converter exists.
>
> Is there an appropriate exception recommended to be used?
>
> thank you!
> Cristiano



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to