From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by margaux.inria.fr, Thu, 7 Jan 93 10:28:37 +0100 Received: from localhost.inria.fr by margaux.inria.fr, Tue, 5 Jan 93 16:16:57 +0100 To: caml-list@margaux Subject: Convention on exceptions for caml-light Return-Receipt-To: murthy@margaux Date: Tue, 05 Jan 93 16:16:55 N Message-Id: <908.726247015@margaux.inria.fr> From: murthy@margaux Sender: weis@margaux What sort of schools of thought are there on the way that exceptions should be chosen when one is writing libraries of code? I am in the process of writing a library of modules for arrays, strings, and lists, which will provide a common interface for all three - so that the naming and calling conventions will be identical. I want to also make the exception behaviour either identical or symmetrical. I'm not sure which. I.e. should I declare different exceptions in each module, or should all the modules share the same exceptions. NJ SML seems to take the first aproach a bit, but it mixes the two a bit. I'm not really sure what I want, but the approach of Failure of string is really easy to use, in practice. Though, if there were a complex piece of code, I can see that it could be hard to figure out WHERE the error came from.