From: Luca Pascali <luca@barettadeit.com>
To: caml-list@inria.fr
Subject: exception Failure and failwith
Date: Tue, 21 Jun 2005 10:34:05 +0200 [thread overview]
Message-ID: <42B7D0FD.5090305@barettadeit.com> (raw)
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
next reply other threads:[~2005-06-21 8:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-21 8:34 Luca Pascali [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42B7D0FD.5090305@barettadeit.com \
--to=luca@barettadeit.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox