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
RE: Where did the exception occur?~F
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-10-31 (16:57)
From: Damien Doligez <Damien.Doligez@i...>
Subject: RE: Where did the exception occur?~F
>From: "Mattias Waldau" <>

>Of cource, I could catch each of these at their location, and raise a
>specific exception for each.
>This, however, would mess up the code.

No need for a specific expression, just use "assert false":

  try Hashtbl.find foo bar
  with Not_found -> assert false

and it will report the exact location of the problem.

-- Damien