From 2a397a2ddb471dfbd2f6a9f547b05c8acbebd7d9 Mon Sep 17 00:00:00 2001 From: edwardsmj Date: Wed, 13 May 2009 18:42:40 +0000 Subject: 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 --- .../sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java | 8 +++++--- 1 file 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); -- cgit v1.2.3