aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2017-10-06 14:24:17 +0200
committerCamil Staps2017-10-06 14:24:17 +0200
commit30aecfc754a75f0c873c99a4f1f8f45af62889ac (patch)
treebcfddb8fb0cce2bf7f29351da0acf883fbaaa1aa
parentInitial commit (diff)
Error handling
-rwxr-xr-xiclm14
1 files changed, 12 insertions, 2 deletions
diff --git a/iclm b/iclm
index 6931d59..0b49881 100755
--- a/iclm
+++ b/iclm
@@ -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