Skip to content

Commit d2a251c

Browse files
committed
Improved error message when no library headers are found
1 parent f58f8d3 commit d2a251c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.util.List;
5555
import java.util.Optional;
5656

57+
import static processing.app.I18n.format;
5758
import static processing.app.I18n.tr;
5859

5960
public class LibrariesIndexer {
@@ -203,7 +204,7 @@ private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
203204
LegacyUserLibrary lib = LegacyUserLibrary.create(folderDesc);
204205
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
205206
if (headers.length == 0) {
206-
throw new IOException(lib.getSrcFolder().getAbsolutePath());
207+
throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder()));
207208
}
208209
addToInstalledLibraries(lib);
209210
return;
@@ -213,7 +214,7 @@ private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
213214
UserLibrary lib = UserLibrary.create(folderDesc);
214215
String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder());
215216
if (headers.length == 0) {
216-
throw new IOException(lib.getSrcFolder().getAbsolutePath());
217+
throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder()));
217218
}
218219
addToInstalledLibraries(lib);
219220

0 commit comments

Comments
 (0)