Skip to content

Commit fe693bd

Browse files
committed
fix return code and other notes
1 parent 47385a9 commit fe693bd

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

app/src/processing/mode/java/Commander.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,15 @@ public Commander(String[] args) {
156156
// }
157157

158158
} else if (arg.startsWith(bitsArg)) {
159-
String bitsStr = arg.substring(bitsArg.length());
160-
if (bitsStr.equals("32")) {
161-
platformBits = 32;
162-
} else if (bitsStr.equals("64")) {
163-
platformBits = 64;
164-
} else {
165-
complainAndQuit("Bits should be either 32 or 64, not " + bitsStr, true);
166-
}
159+
complainAndQuit("The --platform option has been removed from Processing 2.1.", false);
160+
// String bitsStr = arg.substring(bitsArg.length());
161+
// if (bitsStr.equals("32")) {
162+
// platformBits = 32;
163+
// } else if (bitsStr.equals("64")) {
164+
// platformBits = 64;
165+
// } else {
166+
// complainAndQuit("Bits should be either 32 or 64, not " + bitsStr, true);
167+
// }
167168

168169
} else if (arg.startsWith(sketchArg)) {
169170
sketchPath = arg.substring(sketchArg.length());
@@ -290,6 +291,7 @@ public Commander(String[] args) {
290291

291292
} catch (SketchException re) {
292293
statusError(re);
294+
System.exit(1);
293295

294296
} catch (IOException e) {
295297
e.printStackTrace();
@@ -317,13 +319,16 @@ public void statusError(Exception exception) {
317319
if (codeIndex != -1) {
318320
// format the runner exception like emacs
319321
//blah.java:2:10:2:13: Syntax Error: This is a big error message
322+
// Emacs doesn't like the double line thing coming from Java
323+
// https://github.com/processing/processing/issues/2158
320324
String filename = sketch.getCode(codeIndex).getFileName();
321325
int line = re.getCodeLine() + 1;
322326
int column = re.getCodeColumn() + 1;
323327
//if (column == -1) column = 0;
324328
// TODO if column not specified, should just select the whole line.
329+
// But what's the correct syntax for that?
325330
systemErr.println(filename + ":" +
326-
line + ":" + column + ":" +
331+
line + ":" + column + ":" +
327332
line + ":" + column + ":" + " " + re.getMessage());
328333

329334
} else { // no line number, pass the trace along to the user
@@ -366,9 +371,9 @@ static void printCommandLine(PrintStream out) {
366371
out.println("--export Export an application.");
367372
// out.println("--platform Specify the platform (export to application only).");
368373
// out.println(" Should be one of 'windows', 'macosx', or 'linux'.");
369-
out.println("--bits Must be specified if libraries are used that are");
370-
out.println(" 32- or 64-bit specific such as the OpenGL library.");
371-
out.println(" Otherwise specify 0 or leave it out.");
374+
// out.println("--bits Must be specified if libraries are used that are");
375+
// out.println(" 32- or 64-bit specific such as the OpenGL library.");
376+
// out.println(" Otherwise specify 0 or leave it out.");
372377
out.println();
373378
}
374379

0 commit comments

Comments
 (0)