src/HOL/Tools/Predicate_Compile/code_prolog.ML
changeset 51704 0b0fc7dc4ce4
parent 51314 eac4bb5adbf9
child 51709 19b47bfac6ef
--- a/src/HOL/Tools/Predicate_Compile/code_prolog.ML	Fri Apr 12 17:21:51 2013 +0200
+++ b/src/HOL/Tools/Predicate_Compile/code_prolog.ML	Fri Apr 12 17:56:51 2013 +0200
@@ -791,7 +791,12 @@
   in
     if getenv env_var = "" then
       (warning (env_var ^ " not set; could not execute code for " ^ string_of_system system); "")
-    else fst (Isabelle_System.bash_output (cmd ^ File.shell_path file))
+    else
+      (case Isabelle_System.bash_output (cmd ^ File.shell_path file) of
+        (out, 0) => out
+      | (_, rc) =>
+          error ("Error caused by prolog system " ^ env_var ^
+            ": return code " ^ string_of_int rc))
   end