You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gu...@apache.org on 2013/04/29 17:17:54 UTC

svn commit: r1477142 - /felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java

Author: guillaume
Date: Mon Apr 29 15:17:53 2013
New Revision: 1477142

URL: http://svn.apache.org/r1477142
Log:
Add exception messages if available

Modified:
    felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java

Modified: felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java?rev=1477142&r1=1477141&r2=1477142&view=diff
==============================================================================
--- felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java (original)
+++ felix/trunk/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java Mon Apr 29 15:17:53 2013
@@ -159,7 +159,12 @@ public class Arch {
             if (!instanceDeclaration.getStatus().isBound()) {
                 if (instance.equals(name(instanceDeclaration.getConfiguration()))) {
                     System.out.println(format("Instance %s not bound to its factory%n", instance));
+                    System.out.println(format(" type: %s%n", instanceDeclaration.getComponentName()));
                     System.out.println(format(" -> %s%n", instanceDeclaration.getStatus().getMessage()));
+                    Throwable throwable = instanceDeclaration.getStatus().getThrowable();
+                    if (throwable != null) {
+                        throwable.printStackTrace(System.out);
+                    }
                     return;
                 }
             }
@@ -211,6 +216,10 @@ public class Arch {
                 // Unbound: maybe private or public type
                 System.out.printf("Factory %s is not bound%n", type.getComponentName());
                 System.out.printf("  -> %s%n", type.getStatus().getMessage());
+                Throwable throwable = type.getStatus().getThrowable();
+                if (throwable != null) {
+                    throwable.printStackTrace(System.out);
+                }
             } else {
                 // Bound, this is only a private factory
                 System.out.printf("Factory %s is bound - Private%n", type.getComponentName());