catch exceptions that occur during the parsing (stringindexoutofbound etc) and

print stack trace to stdout but don't stop parsing the app.
This commit is contained in:
stefanp 2003-03-03 12:30:17 +00:00
parent 26529df21a
commit ccb89fbfd9

View file

@ -84,6 +84,7 @@ public class DocPrototype extends DocDirElement {
File f = new File (location.getAbsolutePath (), arr[i]); File f = new File (location.getAbsolutePath (), arr[i]);
if (f.isDirectory ()) if (f.isDirectory ())
continue; continue;
try {
if (arr[i].endsWith (".skin")) { if (arr[i].endsWith (".skin")) {
addChild (DocSkin.newInstance (f, this)); addChild (DocSkin.newInstance (f, this));
} else if (arr[i].endsWith (".properties")) { } else if (arr[i].endsWith (".properties")) {
@ -98,6 +99,10 @@ public class DocPrototype extends DocDirElement {
addChild (elements[j]); addChild (elements[j]);
} }
} }
} catch (Exception ex) {
System.out.println ("couldn't parse file " + f.getAbsolutePath () + ": " + ex.toString ());
ex.printStackTrace ();
}
} }
} }