caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: [Caml-list] Silently discarded exceptions?
Date: Sun, 18 Aug 2002 16:52:30 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.95.1020818164703.2283A-100000@first.in-berlin.de> (raw)

Hello,

under Ocaml 3.04 following problem occurs:

I have a test on the first char of a string (Position 0).
If the string is "" then normally (in the toplevel) an
exception is thrown.

When compiling with ocamlc, the program does not
mention that there was an Exception: it silently
stops the execution of my test.
When adding a test on String.length and only testing
the first char of the string, if the String.length is > 0,
then the program continues with the expected behaviour.

What is the problem here?

Are some exceptions, mentioned on the toplevel,
not an issue, when using ocamlc?
Or ist this a bug?

Ciao,
   Oliver

P.S.: The exception, which the toplevel throws is:
      Exception: Invalid_argument "String.get"

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2002-08-18 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-18 14:52 Oliver Bandel [this message]
2002-08-19 13:54 ` Xavier Leroy
2002-08-19 17:44   ` Oliver Bandel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.95.1020818164703.2283A-100000@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).