olabusayoT commented on code in PR #1610:
URL: https://github.com/apache/daffodil/pull/1610#discussion_r2683191537


##########
daffodil-core/src/test/java/org/apache/daffodil/jexample/TestAPI.java:
##########
@@ -242,6 +243,20 @@ public void testAPI1_A_Full_SavedParser() throws Exception 
{
     assertNotNull(parser);
   }
 
+  // This is a duplicate of testAPII with an incorrect ProcessorFactory path
+  @Test
+  public void testAPI1_B() throws IOException, ClassNotFoundException {
+    DebuggerRunnerForAPITest customRunner = new DebuggerRunnerForAPITest();
+    Debugger debugger = Daffodil.newDaffodilDebugger(customRunner);
+
+    org.apache.daffodil.api.Compiler c = Daffodil.compiler();
+    java.io.File schemaFile = getResource("/test/api/mySchema1.dfdl.xsd");
+    ProcessorFactory pf = c.compileFile(schemaFile);
+    DataProcessor dp = pf.onPath("/something/else");
+    assertTrue(pf.isError());

Review Comment:
   So without the changes, we end up throwing the SDE which Steve said we 
shouldn't be doing from the ProcessorFactory, that we should instead add the 
error to the diagnostics. I feel you on the null comment, I think Steve said we 
ought to create a DataProcessor with p and u set to null, so lemme try that 
instead, and we can check dp.isError instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to