BUG-1070: log exceptions 75/7375/1
authorRobert Varga <rovarga@cisco.com>
Sat, 24 May 2014 08:10:30 +0000 (10:10 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 24 May 2014 08:12:19 +0000 (10:12 +0200)
When we fail to construct a schema context, we do not log any sensible
cause at all, leaving not nearly enough evidence to pin down the
problem. Step one is to start reporting thrown exceptions.

Change-Id: Ie8ccc8f77eb18dfc385d13b81b5c5094866df177
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/URLSchemaContextResolver.java

index fe32493b120efbe97cd3df5a3b7f426a8c6c4e51..41066939c79ac1fed046a8702a64316d01a589dd 100644 (file)
@@ -145,7 +145,7 @@ public class URLSchemaContextResolver implements AdvancedSchemaSourceProvider<In
             }
             currentSourceContext = context;
         } catch (Exception e) {
-            LOG.error("Could not create schema context for {} ",context.getValidSources());
+            LOG.error("Could not create schema context for {} ", context.getValidSources(), e);
         }
         return Optional.absent();
     }