On Thu, Dec 22, 2011 at 11:35:41PM +0100, Stéphane Glondu wrote: > Le 22/12/2011 22:39, oliver a écrit : > >>> where is there a documentation about these kind of errors from pcre-lib? > >>> I'm using Pcre.pmatch, which should just give me a bool. > >> > >> See pcre.mli. Pcre.Error(0) is the raw representation of Partial (i.e. > >> string only matched the pattern partially). > > [...] > > > > In my pcre.mli this error is not mentioned. > > > > There is a > > > > > > type error = > > | Partial (** String only matched the pattern partially *) > ^^^^^^^ > > There. > > > Which also mentioned a partial-match error. > > But Pcre.Error(0) looks somehow cryptical > > and strange to me. > > Pcre.Error(0) is cryptical but not strange: it is the same as > Pcre.Error(Pcre.Partial). [...]
> Whatever gives you the error message ... would be interesting to know. In some other code with partial matches, I got no error... (with or without the partial-flag). And I also would not await an error at all... The difference between the true/false result and the Pcre.Error(0) result is, that the latter one occurs in recursive calls of a function. But AFAIK pcre-ocaml should have no problem here... ...and it's not even multithreaded, but even there, nothing like that should happen...?! > mentioning Pcre.Error(0) does not have access to type information, so it > cannot give you more than Pcre.Error(0). You didn't tell where the error > message came from. Can you be more precise in what you mean with where it comes from? If the exception is called Pcre.Error(0) I would assume it., coming from Pcre module. Ciao, Oliver -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
