Add exception messages if available

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1477142 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java b/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
index dffd51d..af6be2a 100644
--- a/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
+++ b/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
@@ -159,7 +159,12 @@
             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 @@
                 // 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());