Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Damien Doligez <Damien.Doligez@i...>
Subject: RE: Where did the exception occur?~F
>From: "Mattias Waldau" <mattias.waldau@tacton.se>

>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