1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Compiler: missing mandatory key now blocks compilation

This commit is contained in:
Federico Fissore
2015-01-08 13:45:17 +01:00
parent 20ac20f629
commit 980709f6f7
3 changed files with 36 additions and 30 deletions

View File

@ -1924,6 +1924,10 @@ public class Editor extends JFrame implements RunnerListener {
sketch.prepare();
sketch.build(false);
statusNotice(_("Done compiling."));
} catch (PreferencesMapException e) {
statusError(I18n.format(
_("Error while compiling: missing '{0}' configuration parameter"),
e.getMessage()));
} catch (Exception e) {
status.unprogress();
statusError(e);
@ -1941,6 +1945,10 @@ public class Editor extends JFrame implements RunnerListener {
sketch.prepare();
sketch.build(true);
statusNotice(_("Done compiling."));
} catch (PreferencesMapException e) {
statusError(I18n.format(
_("Error while compiling: missing '{0}' configuration parameter"),
e.getMessage()));
} catch (Exception e) {
status.unprogress();
statusError(e);

View File

@ -29,6 +29,7 @@ import processing.app.debug.Compiler.ProgressListener;
import processing.app.debug.RunnerException;
import processing.app.forms.PasswordAuthorizationDialog;
import processing.app.helpers.OSUtils;
import processing.app.helpers.PreferencesMapException;
import processing.app.packages.Library;
import static processing.app.I18n._;
@ -1129,7 +1130,7 @@ public class Sketch {
* @return null if compilation failed, main class name if not
* @throws RunnerException
*/
public String build(boolean verbose) throws RunnerException {
public String build(boolean verbose) throws RunnerException, PreferencesMapException {
return build(tempBuildFolder.getAbsolutePath(), verbose);
}
@ -1142,7 +1143,7 @@ public class Sketch {
*
* @return null if compilation failed, main class name if not
*/
public String build(String buildPath, boolean verbose) throws RunnerException {
public String build(String buildPath, boolean verbose) throws RunnerException, PreferencesMapException {
// run the preprocessor
editor.status.progressUpdate(20);