summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/interface-java/src/main
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-05-13 18:42:40 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-05-13 18:42:40 +0000
commit2a397a2ddb471dfbd2f6a9f547b05c8acbebd7d9 (patch)
tree1c8e91e049dadc975f6e57d3c3e1b1471afebc78 /java/sca/modules/interface-java/src/main
parent079bac4207e4df2638cda10337bec81b5da10823 (diff)
Improve error reporting in JavaInterfaceIntrospectorImpl - in particular report the names of the artifacts being processed when the error occurred.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@774486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/interface-java/src/main')
-rw-r--r--java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
index c05b21c5ed..029af36d55 100644
--- a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
+++ b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
@@ -104,13 +104,15 @@ public class JavaInterfaceIntrospectorImpl {
if (callback != null && !Void.class.equals(callback.value())) {
callbackClass = callback.value();
if (remotable && !callbackClass.isAnnotationPresent(Remotable.class)) {
- throw new InvalidCallbackException("Callback must be remotable on a remotable interface");
+ throw new InvalidCallbackException("Callback " + callbackClass.getName() +
+ " must be remotable on remotable interface " + clazz.getName());
}
if (!remotable && callbackClass.isAnnotationPresent(Remotable.class)) {
- throw new InvalidCallbackException("Callback must not be remotable on a local interface");
+ throw new InvalidCallbackException("Callback" + callbackClass.getName() +
+ " must not be remotable on local interface " + clazz.getName());
}
} else if (callback != null && Void.class.equals(callback.value())) {
- throw new InvalidCallbackException("No callback interface specified on annotation");
+ throw new InvalidCallbackException("No callback interface specified on callback annotation in " + clazz.getName());
}
javaInterface.setCallbackClass(callbackClass);