Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Checked exceptions and type inference
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard W.M. Jones <rich@a...>
Subject: Re: [Caml-list] Checked exceptions and type inference
On Tue, Mar 11, 2003 at 03:50:13PM -0600, Brian Hurt wrote:
> Is there any research on using checked exceptions in an ML derived 
> language?  Any plans/opinions on implementing checked exceptions in Ocaml?

Please no.

Having written the following thousands of times I am no fan of
checked exceptions ...

try {
  ... the code I WANTED to write ...
}
catch (IOException ex) {
  throw new UncheckedWrapperException (ex);
}
catch (SecurityException ex) {
  throw new UncheckedWrapperException (ex);
}
catch (SomeException ex) {
  throw new UncheckedWrapperException (ex);
}
catch (AnotherException ex) {
  throw new UncheckedWrapperException (ex);
}
catch (SomeOtherException ex) {
  throw new UncheckedWrapperException (ex);
}

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
PTHRLIB is a library for writing small, efficient and fast servers in C.
HTTP, CGI, DBI, lightweight threads: http://www.annexia.org/freeware/pthrlib/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners