mcconnell 2004/01/08 01:44:58
Modified:
merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl
CompositeBlock.java
Log:
Fix UndeclaredThrowableException handling in block proxy (reported by Timothy
Bennet).
Revision Changes Path
1.3 +13 -3
avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/CompositeBlock.java
Index: CompositeBlock.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/activation/impl/src/java/org/apache/avalon/activation/appliance/impl/CompositeBlock.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompositeBlock.java 4 Nov 2003 01:07:52 -0000 1.2
+++ CompositeBlock.java 8 Jan 2004 09:44:57 -0000 1.3
@@ -279,11 +279,21 @@
Object object = provider.resolve();
return method.invoke( object, args );
}
+ catch( UndeclaredThrowableException e )
+ {
+ Throwable cause = e.getUndeclaredThrowable();
+ if( cause != null ) throw cause;
+ final String error =
+ "Delegation error raised by component: " +
m_model.getQualifiedName();
+ throw new ApplianceException( error, e );
+ }
catch( InvocationTargetException e )
{
+ Throwable cause = e.getTargetException();
+ if( cause != null ) throw cause;
final String error =
- "Delegation error raised by provider: " + provider;
- throw new ApplianceException( error, e.getTargetException() );
+ "Delegation error raised by component: " +
m_model.getQualifiedName();
+ throw new ApplianceException( error, e );
}
catch( Throwable e )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]