felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r964476 - /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Date Thu, 15 Jul 2010 15:57:28 GMT
Author: rickhall
Date: Thu Jul 15 15:57:28 2010
New Revision: 964476

URL: http://svn.apache.org/viewvc?rev=964476&view=rev
Log:
Improve error message.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java?rev=964476&r1=964475&r2=964476&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Thu Jul 15 15:57:28 2010
@@ -482,12 +482,13 @@ System.out.println("+++ PACKAGE SPACES E
             // a resolve exception.
             if ((candidates.size() == 0) && !req.isOptional())
             {
-                if (rethrow == null)
+                String msg = "Unable to resolve " + module
+                    + ": missing requirement " + req;
+                if (rethrow != null)
                 {
-                    rethrow =
-                        new ResolveException("Unable to resolve " + module
-                            + ": missing requirement " + req, module, req);
+                    msg = msg + " [caused by: " + rethrow.getMessage() + "]";
                 }
+                rethrow = new ResolveException(msg, module, req);
                 resultCache.put(module, rethrow);
                 System.out.println("No viable candidates: " + rethrow);
                 throw rethrow;



Mime
View raw message