mirror of https://github.com/noisymime/Arduino.git
If parsing a core fails, don't crash but report a warning. Fixes #3307
This commit is contained in:
parent
c1c5e70fe1
commit
0a6577f85c
|
@ -300,7 +300,7 @@ public class ContributionsIndexer {
|
||||||
return index.toString();
|
return index.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TargetPackage> createTargetPackages() throws TargetPlatformException {
|
public List<TargetPackage> createTargetPackages() {
|
||||||
List<TargetPackage> packages = new ArrayList<TargetPackage>();
|
List<TargetPackage> packages = new ArrayList<TargetPackage>();
|
||||||
|
|
||||||
if (index == null) {
|
if (index == null) {
|
||||||
|
@ -317,9 +317,13 @@ public class ContributionsIndexer {
|
||||||
String arch = platform.getArchitecture();
|
String arch = platform.getArchitecture();
|
||||||
File folder = platform.getInstalledFolder();
|
File folder = platform.getInstalledFolder();
|
||||||
|
|
||||||
TargetPlatform targetPlatform = new ContributedTargetPlatform(arch, folder, targetPackage, index);
|
try {
|
||||||
if (!targetPackage.hasPlatform(targetPlatform)) {
|
TargetPlatform targetPlatform = new ContributedTargetPlatform(arch, folder, targetPackage, index);
|
||||||
targetPackage.addPlatform(targetPlatform);
|
if (!targetPackage.hasPlatform(targetPlatform)) {
|
||||||
|
targetPackage.addPlatform(targetPlatform);
|
||||||
|
}
|
||||||
|
} catch (TargetPlatformException e) {
|
||||||
|
System.err.println(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -826,7 +826,7 @@ public class BaseNoGui {
|
||||||
populateImportToLibraryTable();
|
populateImportToLibraryTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
static protected void loadContributedHardware(ContributionsIndexer indexer) throws TargetPlatformException {
|
static protected void loadContributedHardware(ContributionsIndexer indexer) {
|
||||||
for (TargetPackage pack : indexer.createTargetPackages()) {
|
for (TargetPackage pack : indexer.createTargetPackages()) {
|
||||||
packages.put(pack.getId(), pack);
|
packages.put(pack.getId(), pack);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue