aboutsummaryrefslogtreecommitdiff
path: root/lib/system.mli
diff options
context:
space:
mode:
authorTej Chajed2016-04-09 12:46:40 -0400
committerPierre-Marie Pédrot2016-04-25 18:48:39 +0200
commitdc469f9aaf0d5b77458e40893d897de12339b9b3 (patch)
treee6f77723aa86e4ec766eadda10bb001dbf55b30e /lib/system.mli
parentb295d3402ddebfd2ca3aa052a32880df8d9060a2 (diff)
Print magic numbers in bad magic error message
Diffstat (limited to 'lib/system.mli')
-rw-r--r--lib/system.mli6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/system.mli b/lib/system.mli
index 062c8ea856..fa675a4f02 100644
--- a/lib/system.mli
+++ b/lib/system.mli
@@ -34,9 +34,11 @@ val file_exists_respecting_case : string -> string -> bool
(** {6 I/O functions } *)
(** Generic input and output functions, parameterized by a magic number
and a suffix. The intern functions raise the exception [Bad_magic_number]
- when the check fails, with the full file name. *)
+ when the check fails, with the full file name and expected/observed magic
+ numbers. *)
-exception Bad_magic_number of string
+type magic_number_error = {filename: string; actual: int; expected: int}
+exception Bad_magic_number of magic_number_error
val raw_extern_state : int -> string -> out_channel