SketchException refactor by joshgiesbrecht · Pull Request #1164 · processing/processing4
Created an :app:utils module, moved SketchException to a processing.utils package within :app:utils, changed all references to SketchException in both java and app to use processing.utils.SketchException, removed the two duplicate SketchException classes in app and java.preproc.
This currently seems to work (tested only on Linux so far, but I don't think there's anything platform-specific involved), and does solve the bug of highlighting the first error on running a sketch. Non-Java modes will not yet be using the correct SketchException class; I suspect this will be a 'soft' fail that has a similar problem to the existing bug, but I haven't tested this much yet. (Shader mode seems to be broken already?)
Since the draft PR for #1104 also creates :app:utils and is more complex than this PR, I'm fine with waiting until the other PR is merged, and then I can make sure this one merges cleanly before it's added in.
What's the right thing to do re: the impact on non-Java modes? Should I submit PRs for those projects as well, maybe once this one's actually merged into main?