diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-09 11:56:14 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-09 11:56:14 +0000 |
commit | 551f6edf58b574ab5e12207b7c44433514415354 (patch) | |
tree | 07fd2c0be445648ea0d57bfec4aecf2bc6586fd5 /sca-java-2.x/trunk/modules/implementation-java-runtime/src | |
parent | 7965f1a7601a080e06b845f7411a9753c0b2c2a0 (diff) |
TUSCANY-3530 - not a solution for property type validation but display more info at runtime when a simple type conversion fails. We need to validate the property types at read or build time.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@932370 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java-runtime/src')
2 files changed, 4 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java index 8189271ed5..209546ce2f 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java @@ -83,7 +83,7 @@ public class ReflectiveInstanceFactory<T> implements InstanceFactory<T> { if (destroyInvoker != null) { destroyInvoker.invokeEvent(instance); } - throw new ObjectCreationException("Exception invoking injector", e); + throw new ObjectCreationException("Exception invoking injector - " + e.getMessage(), e); } } } diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index 26e1e56845..4d54fbd46c 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -23,6 +23,7 @@ import java.lang.reflect.Method; import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.core.factory.InstanceWrapper; +import org.apache.tuscany.sca.core.factory.ObjectCreationException; import org.apache.tuscany.sca.core.scope.ScopeContainer; import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent; import org.apache.tuscany.sca.implementation.java.JavaImplementation; @@ -137,6 +138,8 @@ public class JavaImplementationInvoker implements Invoker { } } + } catch (ObjectCreationException e) { + throw new ServiceRuntimeException(e.getMessage(), e); } catch (Exception e) { msg.setFaultBody(e); } finally { |