Processing project started in CMD - error handling

You could catch the error through

void setup() {
  try {
     // Whatever your code in setup is
  }
  catch (Exception err) {
    println(err);
    exit();
  }
}

void draw() {
  try {
     // Whatever your code in draw is
  }
  catch (Exception err) {
    println(err);
    exit();
  }
}

try … catch blocks.

EDIT: Added semicolons

1 Like