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 {
break;
default:
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));
break;
}
......
......@@ -36,7 +36,15 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand {
AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() {
@Override
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();
}
......@@ -45,7 +53,7 @@ public class EnsurePhoneConnectedCommand extends ChainableCommand {
if (result) {
executeNextCommand(node);
} else {
ErrorReporter.reportError(MESSAGES.phoneNotConnected());
ErrorReporter.reportInfo(MESSAGES.phoneNotConnected());
executionFailedOrCanceled();
}
}
......
......@@ -91,7 +91,9 @@ public class WaitForBuildResultCommand extends ChainableCommand {
} else if (result.getResult() == 1) {
// General build error
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));
executionFailedOrCanceled();
} else if (result.getResult() == 2) {
......
......@@ -127,7 +127,9 @@ public class ProjectToolbar extends Toolbar {
}
} 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 {
if (selectedProjects.size() == 1) {
downloadSource(selectedProjects.get(0));
} 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 {
fileUploadedCallback);
break;
case FILE_TOO_LARGE:
ErrorReporter.reportError(MESSAGES.fileTooLargeError());
// The user can resolve the problem by
// uploading a smaller file.
ErrorReporter.reportInfo(MESSAGES.fileTooLargeError());
break;
default:
ErrorReporter.reportError(MESSAGES.fileUploadError());
......
......@@ -74,7 +74,12 @@ public class ProjectUploadWizard extends Wizard {
ode.openYoungAndroidProjectInDesigner(uploadedProject);
break;
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;
default:
ErrorReporter.reportError(MESSAGES.projectUploadError());
......
......@@ -268,7 +268,9 @@ public class CodeblocksManager implements ConnectivityListener {
if (conn == null) {
if (codeblocksMustBeOpen) {
// 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) {
callback.onFailure(new InvocationException(MESSAGES.noCodeblocksConnection()));
}
......@@ -284,7 +286,9 @@ public class CodeblocksManager implements ConnectivityListener {
// Codeblocks was open, but has been closed or is unresponsive.
if (codeblocksMustBeOpen) {
// 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) {
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