From f3ff01dbf46b845531784c3ed0cfed011482d38c Mon Sep 17 00:00:00 2001 From: malc Date: Sun, 21 Dec 2014 16:58:40 +0300 Subject: [PATCH] Better error message --- config.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.ml b/config.ml index ae3253a..2041eb0 100644 --- a/config.ml +++ b/config.ml @@ -1970,11 +1970,12 @@ let gc fdi fdo = f () in let rec f ppos = - match String.index_from s ppos '\000' with + match String.index_from s ppos '\000' with | zpos1 -> let zpos2 = try String.index_from s (zpos1+1) '\000' with Not_found -> -1 in - if zpos2 = -1 then failwith "moo2" + if zpos2 = -1 + then error "Incorrect gc input in (%S) at %d" s zpos1 else let okey = StringLabels.sub s ~pos:ppos ~len:(zpos1-ppos) in let nkey = StringLabels.sub s ~pos:(zpos1+1) ~len:(zpos2-zpos1-1) in -- 2.11.4.GIT