mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 13:21:07 +01:00
Catch exception in error checker
This commit is contained in:
@@ -1247,9 +1247,13 @@ public class ErrorCheckerService {
|
||||
"DefaultClass" : editor.getSketch().getName();
|
||||
|
||||
// Check whether the code is being written in STATIC mode
|
||||
String uncommented = PdePreprocessor.scrubComments(sourceAlt);
|
||||
|
||||
mode = PdePreprocessor.parseMode(uncommented);
|
||||
try {
|
||||
String uncommented = PdePreprocessor.scrubComments(sourceAlt);
|
||||
mode = PdePreprocessor.parseMode(uncommented);
|
||||
} catch (RuntimeException r) {
|
||||
String uncommented = PdePreprocessor.scrubComments(sourceAlt + "*/");
|
||||
mode = PdePreprocessor.parseMode(uncommented);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user