Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion app/src/processing/app/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,15 @@ static public void setBoolean(String attribute, boolean value) {


static public int getInteger(String attribute /*, int defaultValue*/) {
return Integer.parseInt(get(attribute));
try {
return Integer.parseInt(get(attribute));
} catch (NumberFormatException err) {
try {
return Integer.parseInt(getDefault(attribute));
} catch (NumberFormatException err2) {
throw new IllegalArgumentException("Cannot parse: " + attribute);
}
}
}


Expand Down
Loading