diff options
author | Camil Staps | 2017-10-06 14:24:17 +0200 |
---|---|---|
committer | Camil Staps | 2017-10-06 14:24:17 +0200 |
commit | 30aecfc754a75f0c873c99a4f1f8f45af62889ac (patch) | |
tree | bcfddb8fb0cce2bf7f29351da0acf883fbaaa1aa | |
parent | Initial commit (diff) |
Error handling
-rwxr-xr-x | iclm | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -62,16 +62,26 @@ proc tryCompile { } { expect { -re "Error \\\[.*\\\]: (.*)\.dcl could not be imported" { tryImport $expect_out(1,string) + return } -re "Can't find (.*)\.icl" { tryImport $expect_out(1,string) + return } "Nonrepresentable section on output" { set args "$args -l -no-pie" feedback "info" "Using -l -no-pie." tryCompile - } eof { - feedback "success" "Done." + return } } + + catch wait reason + if {[lindex $reason 3] == 0} { + feedback "success" "Done building." + } else { + feedback "error" "Errors, see transcript." + } + + exit [lindex $reason 3] } tryCompile |