File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
app/src/processing/app/debug Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 32
32
import java .util .List ;
33
33
34
34
import processing .app .Base ;
35
+ import processing .app .I18n ;
35
36
import processing .app .Preferences ;
36
37
import processing .app .Serial ;
37
38
import processing .app .SerialException ;
@@ -260,7 +261,13 @@ public boolean burnBootloader() throws RunnerException {
260
261
PreferencesMap prefs = Preferences .getMap ();
261
262
prefs .putAll (Base .getBoardPreferences ());
262
263
prefs .putAll (targetPlatform .getProgrammer (programmer ));
263
- prefs .putAll (targetPlatform .getTool (prefs .get ("bootloader.tool" )));
264
+
265
+ String toolName = prefs .get ("bootloader.tool" );
266
+ PreferencesMap toolPrefs = targetPlatform .getTool (toolName );
267
+ if (toolPrefs .size () == 0 )
268
+ throw new RunnerException (I18n .format (_ ("Could not find tool {0}" ),
269
+ toolName ));
270
+ prefs .putAll (toolPrefs );
264
271
if (verbose ) {
265
272
prefs .put ("erase.verbose" , prefs .get ("erase.params.verbose" ));
266
273
prefs .put ("bootloader.verbose" , prefs .get ("bootloader.params.verbose" ));
You can’t perform that action at this time.
0 commit comments