Examples of TypeConversionException


Examples of org.apache.camel.TypeConversionException

            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE) {
            if (statistics.isStatisticsEnabled()) {
                missCounter.incrementAndGet();
View Full Code Here

Examples of org.apache.camel.TypeConversionException

            }
            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE || value == null) {
            if (statistics.isStatisticsEnabled()) {
                missCounter.incrementAndGet();
View Full Code Here

Examples of org.apache.camel.TypeConversionException

            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE) {
            // Could not find suitable conversion
            return null;
View Full Code Here

Examples of org.apache.camel.TypeConversionException

        } catch (Exception e) {
            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE || value == null) {
            // Could not find suitable conversion
            throw new NoTypeConversionAvailableException(value, type);
View Full Code Here

Examples of org.apache.camel.TypeConversionException

        try {
            template.sendBody("direct:a", "World");
            fail("Should have thrown exception");
        } catch (CamelExecutionException e) {
            TypeConversionException cause = assertIsInstanceOf(TypeConversionException.class, e.getCause());
            assertEquals(String.class, cause.getFromType());
            assertEquals(int.class, cause.getToType());
            assertEquals("A", cause.getValue());
        }

        assertMockEndpointsSatisfied();
    }
View Full Code Here

Examples of org.apache.camel.TypeConversionException

        try {
            template.sendBody("direct:b", "World");
            fail("Should have thrown exception");
        } catch (CamelExecutionException e) {
            TypeConversionException cause = assertIsInstanceOf(TypeConversionException.class, e.getCause());
            assertEquals(String.class, cause.getFromType());
            assertEquals(int.class, cause.getToType());
            assertEquals("true", cause.getValue());
        }

        assertMockEndpointsSatisfied();
    }
View Full Code Here

Examples of org.apache.camel.TypeConversionException

            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE) {
            // Could not find suitable conversion
            missCounter.incrementAndGet();
View Full Code Here

Examples of org.apache.camel.TypeConversionException

            failedCounter.incrementAndGet();
            // error occurred during type conversion
            if (e instanceof TypeConversionException) {
                throw (TypeConversionException) e;
            } else {
                throw new TypeConversionException(value, type, e);
            }
        }
        if (answer == Void.TYPE || value == null) {
            // Could not find suitable conversion
            missCounter.incrementAndGet();
View Full Code Here

Examples of org.apache.camel.TypeConversionException

            if (execution) {
                throw ObjectHelper.wrapCamelExecutionException(exchange, e);
            }

            // error occurred during type conversion
            throw new TypeConversionException(value, type, e);
        }
        if (answer == Void.TYPE) {
            // Could not find suitable conversion
            return null;
        } else {
View Full Code Here

Examples of org.apache.camel.TypeConversionException

        Object answer;
        try {
            answer = doConvertTo(type, exchange, value, false);
        } catch (Exception e) {
            // error occurred during type conversion
            throw new TypeConversionException(value, type, e);
        }
        if (answer == Void.TYPE || value == null) {
            // Could not find suitable conversion
            throw new NoTypeConversionAvailableException(value, type);
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.