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,20 +84,25 @@ 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;
if (arr[i].endsWith (".skin")) { try {
addChild (DocSkin.newInstance (f, this)); if (arr[i].endsWith (".skin")) {
} else if (arr[i].endsWith (".properties")) { addChild (DocSkin.newInstance (f, this));
continue; } else if (arr[i].endsWith (".properties")) {
} else if (arr[i].endsWith (".hac")) { continue;
addChild (DocFunction.newAction (f, this)); } else if (arr[i].endsWith (".hac")) {
} else if (arr[i].endsWith (".hsp")) { addChild (DocFunction.newAction (f, this));
addChild (DocFunction.newTemplate (f, this)); } else if (arr[i].endsWith (".hsp")) {
} else if (arr[i].endsWith (".js")) { addChild (DocFunction.newTemplate (f, this));
DocElement[] elements = DocFunction.newFunctions (f, this); } else if (arr[i].endsWith (".js")) {
for (int j=0; j<elements.length; j++) { DocElement[] elements = DocFunction.newFunctions (f, this);
addChild (elements[j]); for (int j=0; j<elements.length; j++) {
} addChild (elements[j]);
} }
}
} catch (Exception ex) {
System.out.println ("couldn't parse file " + f.getAbsolutePath () + ": " + ex.toString ());
ex.printStackTrace ();
}
} }
} }