return;
}
}
}
if (msg instanceof Err) {
Err ex = (Err)msg;
String text = "fatal";
boolean fatal = false;
if (ex instanceof ErrorSyntax) text="syntax"; else if (ex instanceof ErrorType) text="type"; else fatal=true;
if (ex.pos==Pos.UNKNOWN)
span.logBold("A "+text+" error has occurred: ");
else
span.logLink("A "+text+" error has occurred: ", "POS: "+ex.pos.x+" "+ex.pos.y+" "+ex.pos.x2+" "+ex.pos.y2+" "+ex.pos.filename);
if (verbosity>2) {
span.log("(see the "); span.logLink("stacktrace", "MSG: "+ex.dump()); span.log(")\n");
} else {
span.log("\n");
}
span.logIndented(ex.msg.trim());
span.log("\n");
if (fatal && latestVersion>Version.buildNumber())
span.logBold(
"\nNote: You are running Alloy build#"+Version.buildNumber()+
",\nbut the most recent is Alloy build#"+latestVersion+
":\n( version "+latestName+" )\nPlease try to upgrade to the newest version,"+
"\nas the problem may have been fixed already.\n");
span.flush();
if (!fatal) gui.doVisualize("POS: "+ex.pos.x+" "+ex.pos.y+" "+ex.pos.x2+" "+ex.pos.y2+" "+ex.pos.filename);
return;
}
if (msg instanceof Throwable) { Throwable ex = (Throwable)msg; span.logBold(ex.toString().trim()+"\n"); span.flush(); return; }
if (!(msg instanceof Object[])) return;
Object[] array = (Object[]) msg;
if (array[0].equals("pop")) { span.setLength(len2); String x=(String)(array[1]); if (viz!=null && x.length()>0) OurDialog.alert(x); }
if (array[0].equals("declare")) { gui.doSetLatest((String)(array[1])); }
if (array[0].equals("S2")) { len3=len2=span.getLength(); span.logBold(""+array[1]); }