Skip to Content.
Sympa Menu

notify-dpml - r1031 - trunk/main/transit/core/src/main/net/dpml/transit

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1031 - trunk/main/transit/core/src/main/net/dpml/transit
  • Date: Sun, 5 Feb 2006 08:57:24 +0100

Author: mcconnell
Date: 2006-02-05 08:57:05 +0100 (Sun, 05 Feb 2006)
New Revision: 1031

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/Construct.java
Log:
improve error messages

Modified: trunk/main/transit/core/src/main/net/dpml/transit/Construct.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/Construct.java
2006-02-05 07:56:37 UTC (rev 1030)
+++ trunk/main/transit/core/src/main/net/dpml/transit/Construct.java
2006-02-05 07:57:05 UTC (rev 1031)
@@ -375,7 +375,7 @@
catch( Throwable e )
{
final String error =
- "Internal error while evalue expression using:"
+ "Internal error while evalating simple expression using:"
+ "\n target: "
+ m_target
+ " ("
@@ -399,10 +399,10 @@
catch( Throwable e )
{
final String error =
- "Internal error while evalue expression using:"
+ "Internal error while evaluating expression using:"
+ "\n target: " + m_target + " (" + target + ")"
+ "\n method: " + m_method + " (" + method + ")"
- + "\n value: " + m_value + "(" + value + ")";
+ + "\n value: " + m_value + " (" +
value.getClass().getName() + ")";
throw new ValueException( error, e );
}
}
@@ -449,7 +449,23 @@
}
}
Expression expression = new Expression( target, method, instances );
- return expression.getValue();
+ try
+ {
+ return expression.getValue();
+ }
+ catch( Throwable e )
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append( "Internal error while evaluating compound
expression." );
+ buffer.append( "\n target: " + m_target + " (" + target + ")" );
+ buffer.append( "\n method: " + m_method + " (" + method + ")" );
+ for( int i=0; i<instances.length; i++ )
+ {
+ buffer.append( "\n param " + (i+1) + ": " +
instances[i].getClass().getName() );
+ }
+ String error = buffer.toString();
+ throw new ValueException( error, e );
+ }
}

private Object[] getInstanceValues( Map map, ClassLoader classloader,
Value[] args ) throws Exception




  • r1031 - trunk/main/transit/core/src/main/net/dpml/transit, mcconnell at BerliOS, 02/05/2006

Archive powered by MHonArc 2.6.24.

Top of Page