1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Added message for unknown tools.

See #1304
This commit is contained in:
Cristian Maglie 2013-03-05 21:24:34 +01:00
parent 1d89e86b62
commit fe44fbf7e3

View File

@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.List;
import processing.app.Base;
import processing.app.I18n;
import processing.app.Preferences;
import processing.app.Serial;
import processing.app.SerialException;
@ -260,7 +261,13 @@ public class BasicUploader extends Uploader {
PreferencesMap prefs = Preferences.getMap();
prefs.putAll(Base.getBoardPreferences());
prefs.putAll(targetPlatform.getProgrammer(programmer));
prefs.putAll(targetPlatform.getTool(prefs.get("bootloader.tool")));
String toolName = prefs.get("bootloader.tool");
PreferencesMap toolPrefs = targetPlatform.getTool(toolName);
if (toolPrefs.size() == 0)
throw new RunnerException(I18n.format(_("Could not find tool {0}"),
toolName));
prefs.putAll(toolPrefs);
if (verbose) {
prefs.put("erase.verbose", prefs.get("erase.params.verbose"));
prefs.put("bootloader.verbose", prefs.get("bootloader.params.verbose"));