Fix failure source not being reported
[yangtools.git] / parser / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / repo / AssembleSources.java
index 2b04e8e4ddc8fa0b637f40e180a09401816dcecc..9405cb891c594d2b2ef08e583854b67d36160566 100644 (file)
@@ -90,6 +90,9 @@ final class AssembleSources implements AsyncFunction<List<IRSchemaSource>, Effec
         try {
             schemaContext = parser.buildEffectiveModel();
         } catch (final YangParserException e) {
+            if (e.getCause() instanceof ReactorException re) {
+                throw new SchemaResolutionException("Failed to resolve required models", re.getSourceIdentifier(), e);
+            }
             throw new SchemaResolutionException("Failed to resolve required models", e);
         }
 
@@ -105,4 +108,4 @@ final class AssembleSources implements AsyncFunction<List<IRSchemaSource>, Effec
 
         return SemVerSourceIdentifier.create(identifier.getName(), identifier.getRevision(), semver);
     }
-}
\ No newline at end of file
+}