Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Silently discarded exceptions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-18 (14:55)
From: Oliver Bandel <oliver@f...>
Subject: [Caml-list] Silently discarded exceptions?

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?


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

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: