Closed jsimomaa closed 1 year ago
Hello Jani, I hope you're doing well!
Sorry it took me this long to get back to you.
I appreciate you taking the time and effort to contribute, but to be honest I fail to see the value in overriding Throwable.getMessage()
like this. I mean the method is there, you can call it and get the message if it's present. And if it's not, calling ParseException.toString()
won't help as it ultimately does the same thing, calls the parent's getMessage()
. Also, calling any one of them when detailMessage
is null
results in StackOverflowError
as they keep calling each other back and forth :)
Sorry, initially missed the reference to the issue, somehow.
The details there revealed that the real problem is not in ParseException
, but in UnexpectedCharacterException
: it doesn't pass any messages to its parent. The proposed change, however, still isn't a good fix as it breaks ParseException
. Will fix it soon.
Cheers,
Overriding getMessage() in order to prevent cases where
detailMessage = null
in order to provide descriptive messagesSee #38 for more detail