caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* exception Failure and failwith
@ 2005-06-21  8:34 Luca Pascali
  2005-06-21  9:07 ` [Caml-list] " Luc Maranget
  2005-06-21  9:30 ` Julien Signoles
  0 siblings, 2 replies; 8+ messages in thread
From: Luca Pascali @ 2005-06-21  8:34 UTC (permalink / raw)
  To: caml-list

Hi everyone.

I've ran into a situation and I need a little explanation.

It's all about the failwith function of pervasives (that simply raises 
an exception Failure of string).
Normally, that exception can be cought by means of a try...with using as 
clause something like
| Failure s -> .....

That's good.
But what if I define something (another exception like module Stream 
does), a constructor (like I did) with the name Failure?

Obviously the Ocaml type checker will make all controls with the new 
definition of Failure (starting from that point).
But what if I want to catch the Failure exception? :-/
It seems that no module defines it, so I did not find any way to 
identify the exception.

Thanks to everyone
Luca

-- 
*********************************************************************
Luca Pascali
luca@barettadeit.com
asxcaml-guru@barettadeit.com

http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. 02 370 111 55
fax. 02 370 111 54

Our technology:
http://www.asxcaml.org/
http://www.freerp.org/


	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-23  8:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-21  8:34 exception Failure and failwith Luca Pascali
2005-06-21  9:07 ` [Caml-list] " Luc Maranget
2005-06-21 11:15   ` Luca Pascali
2005-06-21 11:34     ` Luc Maranget
2005-06-21 18:23       ` sejourne_kevin
2005-06-21 18:55       ` William Lovas
2005-06-23  8:04         ` Luca Pascali
2005-06-21  9:30 ` Julien Signoles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).