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] assert caught by try with _
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-07-30 (15:47)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] assert caught by try with _
On Wednesday, Jul 30, 2003, at 03:22 US/Pacific, Yaron M. Minsky wrote:
> Not so fast.  I have hit the same issue and entirely agree.  In 
> general,
> the issue of making sure that an exception escapes when you want it to
> is a bit of a problem, and it would be nice to have some way of dealing
> with this, and not just with asserts.  But certainly asserts should 
> have
> the option for the kind of always-die behavior you're talking about.

let die_unless p s =
	if not p then begin
		Printf.printf "die: %s\n" s;
		flush stdout;
		exit (-1)

Slightly less convenient than assert, but has the effect of dying 

For my part, I *like* the behavior of assert and exception the way it 

j h woodyatt <>

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