From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id oBPKD32H030524 for ; Sat, 25 Dec 2010 21:13:03 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwAAN/eFU3RVdY0kGdsb2JhbACVZzGOEQgVAQEBAQkJDAcRBCClCIl3ghiDfi6IVwEBAwWFRQSEZTyFY4UmbA X-IronPort-AV: E=Sophos;i="4.60,229,1291590000"; d="scan'208";a="93186711" Received: from mail-bw0-f52.google.com ([209.85.214.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 25 Dec 2010 21:12:58 +0100 Received: by bwz4 with SMTP id 4so9181301bwz.39 for ; Sat, 25 Dec 2010 12:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=sciIVQ82pgMjKqtdw6Yot8zMFScMQFk9XNonZxQ7lCU=; b=M6w07YFKFfl3QDxkEyy5PFLJQyN154B2TjmnKzl4WSUgibKO2e3JAD8AU0k6zQLYvX QCdxxQ9zEV3pm5xkd9k3k9dqRXFThKtySTB2cTUv1IlOkGhbT6YQ9TAJ3/FESD6pV4cF Ks9QtGby8/jueTrEG/jGtykJ0uyGnpXxhBOB8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=GukUWf2/jAdUtWk0iqazLqO7b6C+QdTy3UTwU2kfZ/uq5KApDd/tslmt3Ig4Hvnkfv HcFb8SyxJLqQnXopYnjUtFar2y/pc2teulHQAK/9UbeCafkXbUPJrUZkU+Ta3fIeJkp5 DWYX6ttvuePG9QYMGLn9Od/nOhU1rwpxHUvuU= MIME-Version: 1.0 Received: by 10.204.77.199 with SMTP id h7mr9018700bkk.79.1293307975484; Sat, 25 Dec 2010 12:12:55 -0800 (PST) Received: by 10.204.71.3 with HTTP; Sat, 25 Dec 2010 12:12:55 -0800 (PST) In-Reply-To: <20101224142501.GA3936@siouxsie> References: <20101224040306.GA18312@siouxsie> <20101224142501.GA3936@siouxsie> Date: Sat, 25 Dec 2010 15:12:55 -0500 Message-ID: From: Markus Mottl To: oliver@first.in-berlin.de Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id oBPKD32H030524 Subject: Re: [Caml-list] PCRE: Invalid_argument("Pcre.get_offset_start: illegal offset") It is documented: the API-documentation clearly says that Invalid_argument is going to be raised if you are trying to access a nonexistent substring, and it is being raised here. Regards, Markus On Fri, Dec 24, 2010 at 09:25, wrote: > On Fri, Dec 24, 2010 at 05:03:06AM +0100, oliver@first.in-berlin.de wrote: >> Hello, >> >> I could not find a description in the PCRE-documentation, >> where this error comes from. >> >> This does occur on my call to get_substring, >> but get_substring has documented exceptions, >> in case something goes wrong: >> >>     * Invalid_argument if n is not in the range of the number of substrings. >>     * Not_found if the corresponding subpattern did not capture a substring. > [...] > > It seems that trying to extract more substrings than are available, > this exception is raised. > > This behaviour seems not to be documented. > > 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 > > -- Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com