aboutsummaryrefslogtreecommitdiff
path: root/lib/system.ml
diff options
context:
space:
mode:
authorbarras2001-03-09 16:11:48 +0000
committerbarras2001-03-09 16:11:48 +0000
commit36701f1900c8247d76436f2cf7ee09865b45ce3f (patch)
tree676be76a6456ac80de184f3f9573fb68682aa583 /lib/system.ml
parentba343a917c0871a60669e5e95c63a9ed9b796ba4 (diff)
protection contre certaines exceptions levees par marshal_{in,out}
possibilite de declarer une def syntaxique comme infix (utilise par FTA) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1442 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/system.ml')
-rw-r--r--lib/system.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/system.ml b/lib/system.ml
index d3b2229227..db478d9e35 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -110,7 +110,9 @@ let try_remove f =
'sTR f ; 'sTR" which is corrupted!" >]
let marshal_out ch v = Marshal.to_channel ch v []
-let marshal_in ch = Marshal.from_channel ch
+let marshal_in ch =
+ try Marshal.from_channel ch
+ with End_of_file -> error "corrupted file: reached end of file"
exception Bad_magic_number of string