Bug 6244: Add context to exceptions thrown by yang statement parser
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug5946Test.java
index 235d207174f5375c8eb8c90f44c9f74deb18f115..827c0a52d6027e3ab7a324e43e376a21db247551 100644 (file)
@@ -82,8 +82,8 @@ public class Bug5946Test {
         try {
             StmtTestUtils.parseYangSources(new File(getClass().getResource("/bugs/bug5946/foo-invalid.yang").toURI()));
             fail("Should fail due to invalid argument of unique constraint");
-        } catch (SourceException e) {
-            assertTrue(e.getMessage().startsWith(
+        } catch (ReactorException e) {
+            assertTrue(e.getCause().getMessage().startsWith(
                     "Unique statement argument '/simple-unique/l1' contains schema node identifier '/simple-unique/l1'"
                             + " which is not in the descendant node identifier form."));
         }