mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Library: converted nulls to checked exceptions, removed printStackTrace, added "dependencies" member
This commit is contained in:
parent
2a051a76a7
commit
14308c66d7
@ -1132,14 +1132,14 @@ public class Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LibraryList scanLibraries(List<File> folders) {
|
public LibraryList scanLibraries(List<File> folders) throws IOException {
|
||||||
LibraryList res = new LibraryList();
|
LibraryList res = new LibraryList();
|
||||||
for (File folder : folders)
|
for (File folder : folders)
|
||||||
res.addOrReplaceAll(scanLibraries(folder));
|
res.addOrReplaceAll(scanLibraries(folder));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LibraryList scanLibraries(File folder) {
|
public LibraryList scanLibraries(File folder) throws IOException {
|
||||||
LibraryList res = new LibraryList();
|
LibraryList res = new LibraryList();
|
||||||
|
|
||||||
String list[] = folder.list(new OnlyDirs());
|
String list[] = folder.list(new OnlyDirs());
|
||||||
@ -1184,7 +1184,11 @@ public class Base {
|
|||||||
// Scan for libraries in each library folder.
|
// Scan for libraries in each library folder.
|
||||||
// Libraries located in the latest folders on the list can override
|
// Libraries located in the latest folders on the list can override
|
||||||
// other libraries with the same name.
|
// other libraries with the same name.
|
||||||
libraries = scanLibraries(librariesFolders);
|
try {
|
||||||
|
libraries = scanLibraries(librariesFolders);
|
||||||
|
} catch (IOException e) {
|
||||||
|
showWarning(_("Error"), _("Error reading preferences"), e);
|
||||||
|
}
|
||||||
String currentArch = Base.getTargetPlatform().getName();
|
String currentArch = Base.getTargetPlatform().getName();
|
||||||
libraries = libraries.filterByArchitecture(currentArch);
|
libraries = libraries.filterByArchitecture(currentArch);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user