Provide more information when throwin exception 57/7157/1
authorRobert Varga <rovarga@cisco.com>
Sun, 18 May 2014 13:40:34 +0000 (15:40 +0200)
committerRobert Varga <rovarga@cisco.com>
Sun, 18 May 2014 14:29:03 +0000 (16:29 +0200)
This adds some context to the thrown exception such that at least the
class name is captured.

Change-Id: Id6b215d0841f2c29ce90292c474b6eb804e08488
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleInfoBackedContext.java

index 93c63a2c5bf54cdaeb91a2e9c38ab6d055f9b853..cf5c83d729070f113570fc6a44f18ef29e6b02a5 100644 (file)
@@ -114,7 +114,7 @@ public class ModuleInfoBackedContext extends GeneratedClassLoadingStrategy //
         try {
             return resolveModuleInfo(BindingReflections.getModuleInfo(cls));
         } catch (Exception e) {
-            throw new IllegalStateException(e);
+            throw new IllegalStateException(String.format("Failed to resolve module information for class %s", cls), e);
         }
     }