Browse thread
Static exception analysis or alternative to using exceptions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-05-31 (21:43) |
From: | blue storm <bluestorm.dylc@g...> |
Subject: | Re: [Caml-list] Static exception analysis or alternative to using exceptions |
> I use a syntax extension that catches "Not_found" and raises a failure > instead, with the source location of the "real" offending call. I do > this mostly because OUnit catches exceptions so backtraces are of no > use. I have encoutered the same problem and resolved it with explicit backtrace handling in Printexc. I use the following function wrapper : let verbose_func func x = try func x with exn -> Printf.printf "Test error %s\n%!" (Pinrtexc.to_string exn); Printf.printf "%s\n%!" (Printexc.get_backtrace ()); raise exn in