Skip to content

Commit dd9f240

Browse files
committed
fix "could not parse -1 for --display" message
1 parent ff1dc3f commit dd9f240

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

build/shared/revisions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and includes a handful of other smaller fixes.
1919
+ Ignore .class files found in the META-INF folder for imported JARs
2020
https://github.com/processing/processing/issues/5778
2121

22+
+ Get rid of errant 'Could not parse -1 for display' message.
2223

2324
+ Fix up and clean a few file i/o issues that were causing resource
2425
leaks with loadXxxx() commands, and intermediate folders not being

core/src/processing/core/PApplet.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10758,9 +10758,11 @@ public void uncaughtException(Thread t, Throwable e) {
1075810758
editorLocation = parseInt(split(value, ','));
1075910759

1076010760
} else if (param.equals(ARGS_DISPLAY)) {
10761-
displayNum = parseInt(value, -1);
10762-
if (displayNum == -1) {
10763-
System.err.println("Could not parse " + value + " for " + ARGS_DISPLAY);
10761+
displayNum = parseInt(value, -2);
10762+
if (displayNum == -2) {
10763+
// this means the display value couldn't be parsed properly
10764+
System.err.println(value + " is not a valid choice for " + ARGS_DISPLAY);
10765+
displayNum = -1; // use the default
1076410766
}
1076510767

1076610768
} else if (param.equals(ARGS_WINDOW_COLOR)) {

core/todo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ X fix/clean a few file i/o issues
33
X deal with possible resource leak when loading URLs
44
X create intermediate folders when saving temp files
55
X fix resource leaks (open files) in loadJSONObject and loadJSONArray
6+
X get rid of errant 'Could not parse -1 for display' message
67

78
contrib
89
X Update missing @Deprecated tags in PApplet.java

0 commit comments

Comments
 (0)