Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm currently using jsts 2.2.2. There "java" Exceptions extend js Error:
https://github.com/bjornharrtell/jsts/blob/2.2.2/src/org/locationtech/jts/geom/TopologyException.js
https://github.com/bjornharrtell/jsts/blob/2.2.2/src/java/lang/RuntimeException.js
This was changed in 2ac1660 , so that "java" Exceptions no longer extended js Error. (Why?)
https://github.com/bjornharrtell/jsts/blob/2.5.0/src/org/locationtech/jts/geom/TopologyException.js
https://github.com/bjornharrtell/jsts/blob/2.5.0/src/java/lang/RuntimeException.js
https://github.com/bjornharrtell/jsts/blob/2.5.0/src/java/lang/Exception.js
This pr adds back extending js Error. (Based on this: https://javascript.info/custom-errors)
Not that I want to catch jsts Exceptions outside jsts. It's just when they extend Error, they behave better, more js error-like: better error message, stacktrace, instanceof Error, etc.