From d2a251c06636c61ed95d31d731652bb5122f1ad6 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 24 Aug 2018 14:27:50 +0200 Subject: [PATCH] Improved error message when no library headers are found --- .../cc/arduino/contributions/libraries/LibrariesIndexer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java index 4193b2ba0..8b7acae74 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java @@ -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);