Commit 7160617f authored by Katie Laverty's avatar Katie Laverty

Merge branch 'master' of github.com:mit-cml/app-inventor-private into player-mods

parents 1f6be777 acf61716
...@@ -89,7 +89,9 @@ public class BuildCommand extends ChainableCommand { ...@@ -89,7 +89,9 @@ public class BuildCommand extends ChainableCommand {
break; break;
default: default:
String errorMsg = result.getError(); String errorMsg = result.getError();
ErrorReporter.reportError(MESSAGES.buildFailedError() + // This is not an internal App Inventor bug. The error is reported as info so that
// the red background is not shown.
ErrorReporter.reportInfo(MESSAGES.buildFailedError() +
(errorMsg.isEmpty() ? "" : " " + errorMsg)); (errorMsg.isEmpty() ? "" : " " + errorMsg));
break; break;
} }
......
...@@ -36,7 +36,15 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand { ...@@ -36,7 +36,15 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand {
AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() { AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
ErrorReporter.reportError(caught.getMessage()); if (caught.getMessage().equals(MESSAGES.noCodeblocksConnection())) {
// This error is not an App Inventor bug; therefore, it
// should be reported as an info message.
ErrorReporter.reportInfo(caught.getMessage());
}else{
// The error is something else; therefore, report as
// an error message.
ErrorReporter.reportError(caught.getMessage());
}
executionFailedOrCanceled(); executionFailedOrCanceled();
} }
...@@ -45,7 +53,7 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand { ...@@ -45,7 +53,7 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand {
if (result) { if (result) {
executeNextCommand(node); executeNextCommand(node);
} else { } else {
ErrorReporter.reportError(MESSAGES.phoneNotConnected()); ErrorReporter.reportInfo(MESSAGES.phoneNotConnected());
executionFailedOrCanceled(); executionFailedOrCanceled();
} }
} }
......
...@@ -91,7 +91,9 @@ public class WaitForBuildResultCommand extends ChainableCommand { ...@@ -91,7 +91,9 @@ public class WaitForBuildResultCommand extends ChainableCommand {
} else if (result.getResult() == 1) { } else if (result.getResult() == 1) {
// General build error // General build error
String errorMsg = result.getError(); String errorMsg = result.getError();
ErrorReporter.reportError(MESSAGES.buildFailedError() + // This is not an internal App Inventor bug. The error should be
// reported in a yellow info box.
ErrorReporter.reportInfo(MESSAGES.buildFailedError() +
(errorMsg.isEmpty() ? "" : " " + errorMsg)); (errorMsg.isEmpty() ? "" : " " + errorMsg));
executionFailedOrCanceled(); executionFailedOrCanceled();
} else if (result.getResult() == 2) { } else if (result.getResult() == 2) {
......
...@@ -127,7 +127,9 @@ public class ProjectToolbar extends Toolbar { ...@@ -127,7 +127,9 @@ public class ProjectToolbar extends Toolbar {
} }
} else { } else {
ErrorReporter.reportError(MESSAGES.noProjectSelectedForDelete()); // The user can select a project to resolve the
// error.
ErrorReporter.reportInfo(MESSAGES.noProjectSelectedForDelete());
} }
} }
...@@ -202,7 +204,8 @@ public class ProjectToolbar extends Toolbar { ...@@ -202,7 +204,8 @@ public class ProjectToolbar extends Toolbar {
if (selectedProjects.size() == 1) { if (selectedProjects.size() == 1) {
downloadSource(selectedProjects.get(0)); downloadSource(selectedProjects.get(0));
} else { } else {
ErrorReporter.reportError(MESSAGES.wrongNumberProjectsSelected()); // The user needs to select only one project.
ErrorReporter.reportInfo(MESSAGES.wrongNumberProjectsSelected());
} }
} }
......
...@@ -107,7 +107,9 @@ public class FileUploadWizard extends Wizard { ...@@ -107,7 +107,9 @@ public class FileUploadWizard extends Wizard {
fileUploadedCallback); fileUploadedCallback);
break; break;
case FILE_TOO_LARGE: case FILE_TOO_LARGE:
ErrorReporter.reportError(MESSAGES.fileTooLargeError()); // The user can resolve the problem by
// uploading a smaller file.
ErrorReporter.reportInfo(MESSAGES.fileTooLargeError());
break; break;
default: default:
ErrorReporter.reportError(MESSAGES.fileUploadError()); ErrorReporter.reportError(MESSAGES.fileUploadError());
......
...@@ -74,7 +74,12 @@ public class ProjectUploadWizard extends Wizard { ...@@ -74,7 +74,12 @@ public class ProjectUploadWizard extends Wizard {
ode.openYoungAndroidProjectInDesigner(uploadedProject); ode.openYoungAndroidProjectInDesigner(uploadedProject);
break; break;
case NOT_PROJECT_ARCHIVE: case NOT_PROJECT_ARCHIVE:
ErrorReporter.reportError(MESSAGES.notProjectArchiveError()); // This may be a "severe" error; but in the
// interest of reducing the number of red errors, the
// line has been changed to report info not an error.
// This error is triggered when the user attempts to
// upload a zip file that is not a project.
ErrorReporter.reportInfo(MESSAGES.notProjectArchiveError());
break; break;
default: default:
ErrorReporter.reportError(MESSAGES.projectUploadError()); ErrorReporter.reportError(MESSAGES.projectUploadError());
......
...@@ -268,7 +268,9 @@ public class CodeblocksManager implements ConnectivityListener { ...@@ -268,7 +268,9 @@ public class CodeblocksManager implements ConnectivityListener {
if (conn == null) { if (conn == null) {
if (codeblocksMustBeOpen) { if (codeblocksMustBeOpen) {
// If codeblocks is not open, tell the user to open it. // If codeblocks is not open, tell the user to open it.
ErrorReporter.reportError(MESSAGES.noCodeblocksConnection()); // The user can resolve the issue by opening
// the codeblocks editor.
ErrorReporter.reportInfo(MESSAGES.noCodeblocksConnection());
if (callback != null) { if (callback != null) {
callback.onFailure(new InvocationException(MESSAGES.noCodeblocksConnection())); callback.onFailure(new InvocationException(MESSAGES.noCodeblocksConnection()));
} }
...@@ -284,7 +286,9 @@ public class CodeblocksManager implements ConnectivityListener { ...@@ -284,7 +286,9 @@ public class CodeblocksManager implements ConnectivityListener {
// Codeblocks was open, but has been closed or is unresponsive. // Codeblocks was open, but has been closed or is unresponsive.
if (codeblocksMustBeOpen) { if (codeblocksMustBeOpen) {
// If codeblocks has been closed or is unresponsive, report that. // If codeblocks has been closed or is unresponsive, report that.
ErrorReporter.reportError(MESSAGES.codeblocksConnectionUnresponsive()); // The user can resolve this problem by restarting the
// codeblocks editor.
ErrorReporter.reportInfo(MESSAGES.codeblocksConnectionUnresponsive());
if (callback != null) { if (callback != null) {
callback.onFailure(new InvocationException(MESSAGES.codeblocksConnectionUnresponsive())); callback.onFailure(new InvocationException(MESSAGES.codeblocksConnectionUnresponsive()));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment