+ (* Replacement functions that raise better errors when
+ * parsing the init file.
+ *)
+ let int_of_string s =
+ try int_of_string s
+ with Invalid_argument _ ->
+ failwithf (f_"%s: could not parse '%s' in init file: expecting an integer")
+ filename s in
+ let float_of_string s =
+ try float_of_string s
+ with Invalid_argument _ ->
+ failwithf (f_"%s: could not parse '%s' in init file: expecting a number")
+ filename s in
+ let bool_of_string s =
+ try bool_of_string s
+ with Invalid_argument _ ->
+ failwithf (f_"%s: could not parse '%s' in init file: expecting %s")
+ filename s "true|false" in