From: tmp123@menta.net
To: caml-list@yquem.inria.fr
Subject: try with
Date: Sun, 05 Aug 2007 17:29:40 +0200 [thread overview]
Message-ID: <46B5ECE4.2050208@menta.net> (raw)
Hello,
Sorry for an easy question about exceptions:
If in a code like:
let v1 = f1 () in
f2 v1
I like to handle in a different way an exception (like Not_found)
produced inside f1 of the same one produced in f2 (or even not treat the
one produced in f2), which one is a correct way to write the code?
Because the only thing I see up to now is something so overloaded as:
exception Skip;
try
let v1 =
try
f1()
with
Not_found -> handle_f1_exception();
raise Skip
in
f2 v1
with
Skip -> ();
Thanks again.
next reply other threads:[~2007-08-05 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-05 15:29 tmp123 [this message]
2007-08-05 15:23 ` [Caml-list] " Dave Benjamin
2007-08-05 15:50 ` skaller
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=46B5ECE4.2050208@menta.net \
--to=tmp123@menta.net \
--cc=caml-list@yquem.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