@@ -15,9 +15,9 @@ public class Library extends LocalContribution {
1515 protected File examplesFolder ; // shortname/examples
1616 protected File referenceFile ; // shortname/reference/index.html
1717
18- /**
19- * Subfolder for grouping libraries in a menu. Basic subfolder support
20- * is provided so that some organization can be done in the import menu.
18+ /**
19+ * Subfolder for grouping libraries in a menu. Basic subfolder support
20+ * is provided so that some organization can be done in the import menu.
2121 * (This is the replacement for the "library compilation" type.)
2222 */
2323 protected String group ;
@@ -89,13 +89,16 @@ static public Library load(File folder) {
8989 return new Library (folder );
9090// } catch (IgnorableException ig) {
9191// Base.log(ig.getMessage());
92- } catch (Exception e ) {
93- e .printStackTrace ();
92+ } catch (Error err ) {
93+ // Handles UnsupportedClassVersionError and others
94+ err .printStackTrace ();
95+ } catch (Exception ex ) {
96+ ex .printStackTrace ();
9497 }
9598 return null ;
9699 }
97-
98-
100+
101+
99102 private Library (File folder ) {
100103 this (folder , null );
101104 }
@@ -432,14 +435,14 @@ public boolean accept(File dir, String name) {
432435 }
433436 };
434437
435-
438+
436439 static public ArrayList <File > discover (File folder ) {
437440 ArrayList <File > libraries = new ArrayList <File >();
438441 discover (folder , libraries );
439442 return libraries ;
440443 }
441444
442-
445+
443446 static public void discover (File folder , ArrayList <File > libraries ) {
444447 String [] list = folder .list (junkFolderFilter );
445448
@@ -474,14 +477,14 @@ static public void discover(File folder, ArrayList<File> libraries) {
474477 }
475478 }
476479
477-
480+
478481 static protected ArrayList <Library > list (File folder ) {
479482 ArrayList <Library > libraries = new ArrayList <Library >();
480483 list (folder , libraries );
481484 return libraries ;
482485 }
483486
484-
487+
485488 static protected void list (File folder , ArrayList <Library > libraries ) {
486489 ArrayList <File > librariesFolders = new ArrayList <File >();
487490 discover (folder , librariesFolders );
@@ -507,7 +510,7 @@ static protected void list(File folder, ArrayList<Library> libraries) {
507510 }
508511 }
509512
510-
513+
511514 public ContributionType getType () {
512515 return ContributionType .LIBRARY ;
513516 }
0 commit comments