mbeckerle commented on code in PR #1196:
URL: https://github.com/apache/daffodil/pull/1196#discussion_r1542110291
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/api/DFDLParserUnparser.scala:
##########
@@ -236,8 +236,12 @@ object DFDL {
* Thrown by the DaffodilUnparseConentHandler when an unexpected error
* occurs, this usually represents a bug in Daffodil
*/
- class DaffodilUnhandledSAXException(description: String, cause: Exception)
- extends SAXException(description, cause)
+ class DaffodilUnhandledSAXException(description: String, cause: Throwable)
+ extends SAXException(description, new Exception(cause)) {
Review Comment:
Why the Exception wrap? Is that because SAXException will only accept an
Exception as the cause argument?
I would suggest that unless we need our constructors to accept Throwable, we
should also accept only Exception and then we wouldn't need to wrap Exception
to satisfy SAXException's constructor.
--
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]