Skip to content

Commit 4fc7f73

Browse files
committed
Fixed error message if user didn't select any board
1 parent c54316a commit 4fc7f73

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

app/src/processing/app/debug/Compiler.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ public boolean compile(Sketch _sketch, String _buildPath,
117117
private PreferencesMap createBuildPreferences(String _buildPath,
118118
String _primaryClassName)
119119
throws RunnerException {
120+
121+
if (Base.getBoardPreferences() == null) {
122+
RunnerException re = new RunnerException(
123+
_("No board selected; please choose a board from the Tools > Board menu."));
124+
re.hideStackTrace();
125+
throw re;
126+
}
127+
120128
TargetPlatform targetPlatform = Base.getTargetPlatform();
121129

122130
// Merge all the global preference configuration in order of priority
@@ -137,12 +145,6 @@ private PreferencesMap createBuildPreferences(String _buildPath,
137145

138146
// Core folder
139147
String core = p.get("build.core");
140-
if (core == null) {
141-
RunnerException re = new RunnerException(
142-
_("No board selected; please choose a board from the Tools > Board menu."));
143-
re.hideStackTrace();
144-
throw re;
145-
}
146148
TargetPlatform tp;
147149
if (!core.contains(":")) {
148150
tp = targetPlatform;

0 commit comments

Comments
 (0)