Browse thread
Preferred use of Invalid_argument and Failure
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alain Frisch <alain@f...> |
| Subject: | Re: [Caml-list] Preferred use of Invalid_argument and Failure |
Michaël Le Barbier wrote: > I am working on a library, I want the interfaces to look like standard > library modules interfaces. ... > Again, I would be glad to get advices of discipline in using > theses two exceptions. What works for you? My advice would be not to use these two exceptions and to define custom exceptions in your library. You'll be able to pattern match on them more easily and to store extra relevant information. Of course, this breaks your design constraint of looking like the standard library. -- Alain