1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Improved error message when no library headers are found

This commit is contained in:
Cristian Maglie 2018-08-24 14:27:50 +02:00 committed by Cristian Maglie
parent f58f8d3c4b
commit d2a251c066

View File

@ -54,6 +54,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
import static processing.app.I18n.format;
import static processing.app.I18n.tr;
public class LibrariesIndexer {
@ -203,7 +204,7 @@ public class LibrariesIndexer {
LegacyUserLibrary lib = LegacyUserLibrary.create(folderDesc);
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
if (headers.length == 0) {
throw new IOException(lib.getSrcFolder().getAbsolutePath());
throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder()));
}
addToInstalledLibraries(lib);
return;
@ -213,7 +214,7 @@ public class LibrariesIndexer {
UserLibrary lib = UserLibrary.create(folderDesc);
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
if (headers.length == 0) {
throw new IOException(lib.getSrcFolder().getAbsolutePath());
throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder()));
}
addToInstalledLibraries(lib);