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:
parent
26529df21a
commit
ccb89fbfd9
1 changed files with 19 additions and 14 deletions
|
@ -84,6 +84,7 @@ public class DocPrototype extends DocDirElement {
|
|||
File f = new File (location.getAbsolutePath (), arr[i]);
|
||||
if (f.isDirectory ())
|
||||
continue;
|
||||
try {
|
||||
if (arr[i].endsWith (".skin")) {
|
||||
addChild (DocSkin.newInstance (f, this));
|
||||
} else if (arr[i].endsWith (".properties")) {
|
||||
|
@ -98,6 +99,10 @@ public class DocPrototype extends DocDirElement {
|
|||
addChild (elements[j]);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
System.out.println ("couldn't parse file " + f.getAbsolutePath () + ": " + ex.toString ());
|
||||
ex.printStackTrace ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue