mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
Merge pull request #5144 from pacoelayudante/patch-1
make "loadXML(String)" handle "file not found"
This commit is contained in:
@@ -5922,7 +5922,12 @@ public class PApplet implements PConstants {
|
||||
*/
|
||||
public XML loadXML(String filename, String options) {
|
||||
try {
|
||||
return new XML(createReader(filename), options);
|
||||
BufferedReader br = createReader(filename);
|
||||
if (br != null) {
|
||||
return new XML(br, options);
|
||||
} else {
|
||||
br = null;
|
||||
}
|
||||
|
||||
// can't use catch-all exception, since it might catch the
|
||||
// RuntimeException about the incorrect case sensitivity
|
||||
|
||||
Reference in New Issue
Block a user