stevedlawrence commented on a change in pull request #140: TDML Runner and test
changes for Cross Validation with IBM.
URL: https://github.com/apache/incubator-daffodil/pull/140#discussion_r234648342
##########
File path:
daffodil-tdml/src/main/scala/org/apache/daffodil/tdml/TDMLException.scala
##########
@@ -17,16 +17,72 @@
package org.apache.daffodil.tdml
-class TDMLException(msg: String, val causes: Seq[Throwable])
- extends Exception(msg, if (causes.length > 0) causes(0) else null) {
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.util.Maybe
+import org.junit.AssumptionViolatedException
- def this(msg: String) = this(msg, Nil)
+object TDMLException {
- def this(cause: Throwable) = this(cause.getMessage(), List(cause))
+ def msgWithImpl(msg: String, implementation: String) =
+ if (implementation != "none" &&
Review comment:
It looks like "none" is used in cases where the error has nothing to do with
the implementation, e.g. TDML file not found? Does it make sense to give the
implementation parameter a default value so that exceptions that aren't
implementation specific don't need to provide the second argument and know the
magic keyword? Or make implementation an Option?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services