# HG changeset patch # User blanchet # Date 1292580757 -3600 # Node ID 8b6f3917bc7661a5cac8391301a382f888554a8e # Parent def0a3013554343843c577a46a3db550da435dbf Z3 sometimes reports two errors, with the first one referring to line 1 for some strange reason -- but it makes no sense to kill line 1, so we traverse the errors in reverse and consider only the last error diff -r def0a3013554 -r 8b6f3917bc76 src/HOL/Tools/SMT/lib/scripts/z3_wrapper --- a/src/HOL/Tools/SMT/lib/scripts/z3_wrapper Fri Dec 17 09:56:04 2010 +0100 +++ b/src/HOL/Tools/SMT/lib/scripts/z3_wrapper Fri Dec 17 11:12:37 2010 +0100 @@ -29,7 +29,7 @@ print STDERR join("", @err_lines); if ($code != 0) { - foreach my $err_line (@err_lines) { + foreach my $err_line (reverse(@err_lines)) { if ($err_line =~ /[lL]ine ([0-9]+)/) { my $line_num = $1;