stevedlawrence commented on code in PR #1065:
URL: https://github.com/apache/daffodil/pull/1065#discussion_r1528866298


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/DFDLSchemaFile.scala:
##########
@@ -45,16 +46,38 @@ class DFDLSchemaFileLoadErrorHandler(schemaFileLocation: 
SchemaFileLocation)
   private def loaderErrors = loaderErrors_
   private def loaderWarnings = loaderWarnings_
 
-  private def loaderSDEs: Seq[Diagnostic] = loaderErrors.map {
-    new SchemaDefinitionError(schemaFileLocation, "Error loading schema due to 
%s", _)
+  private def loaderSDEs: Seq[Diagnostic] = loaderErrors.map { err =>
+    val errMessage = err.getMessage
+    // we create a new SchemaFileLocation because the Xerces error has line 
and column info that
+    // the original schemaFileLocation that's passed in doesn't contain, so we 
create this more
+    // complete SchemaFileLocation
+    val xsfl = new XercesSchemaFileLocatable(err, "")

Review Comment:
   I see, makes sense. So does it always want to be empty string then? Maybe 
instead of it being a parameter XercesSchemaFileLocatable can do something like 
 `override diagnosticDebugName =  ""` with a comment explaining why that's 
preferred over "Schema File"?



-- 
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