Author: edwardsmj
Date: Wed May 13 18:42:40 2009
New Revision: 774486
URL: http://svn.apache.org/viewvc?rev=774486&view=rev
Log:
Improve error reporting in JavaInterfaceIntrospectorImpl - in particular report
the names of the artifacts being processed when the error occurred.
Modified:
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
Modified:
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java?rev=774486&r1=774485&r2=774486&view=diff
==============================================================================
---
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
(original)
+++
tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
Wed May 13 18:42:40 2009
@@ -104,13 +104,15 @@
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);