Improve yang-maven-plugin error reporting for errors in dependencies
[yangtools.git] / yang / yang-maven-plugin / src / main / java / org / opendaylight / yangtools / yang2sources / plugin / YangToSourcesProcessor.java
index f22b6ee5e31102de32a2b170cfadc51aec81aba3..8ad0e463353a784fccfad75e7f8938420daf4dc7 100644 (file)
@@ -230,6 +230,8 @@ class YangToSourcesProcessor {
             try (InputStream dataStream = yangFromDependency.openStream()) {
                 String contents = IOUtils.toString(dataStream);
                 byContent.putIfAbsent(contents, yangFromDependency);
+            } catch (IOException e) {
+                throw new IOException("Exception when reading from: " + yangFromDependency.getDescription(), e);
             }
 
         }