Skip to content

Commit 67100d5

Browse files
committed
Log warning in case of not found board. May fix #299
1 parent 87fe93a commit 67100d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,11 @@ private static void setTheEnvironmentVariablesAddtheBoardsTxt(IContributedEnviro
648648

649649
// Get the boards section and add all entries to the environment variables
650650
Map<String, String> boardSectionMap = boardsFile.getSection(boardID);
651+
if (boardSectionMap == null) {
652+
Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "The project "
653+
+ confDesc.getProjectDescription().getProject().getName() + " Has an invalid arduino board configuration."));
654+
return;
655+
}
651656
for (Entry<String, String> currentPair : boardSectionMap.entrySet()) {
652657
// if it is not a menu item add it
653658
if (!currentPair.getKey().startsWith("menu.")) {

0 commit comments

Comments
 (0)