Exceptions handling
- Subject: [mg3320] Exceptions handling
- From: fdupont at irisa.fr (Florent Dupont-De-Dinechin)
- Date: 26 Feb 1996 14:06:12 -0600
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE
- Sender: daemon at wri.com
We are developping a relatively big program transformation environment in Mathematica, and we are wondering what is the best way of handling errors. Problems occur when a the evaluation of some function is blocked for some reason (in relation with an error in the input). The caller function gets a whole expression tree instead of getting the expected result, which causes even more errors, and so on. Currently we use various combinations of Catch/Throw, Message/Check and strong type checking to handle these problems, but the result is quite inconsistent and definitely not idiot-proof, and it is getting worse as the size of the system increases (as one may expect). Is there an "official" way of correctly handling exceptions ? We are looking for something like "good programming habits", from the litterature or other users' personal experience. Thanks in advance, Florent "Reality shouldn't constraint our formalisms." -------------------------------------------------------------------------------- Florent de Dinechin. Equipe Architectures Paralleles Integrees IRISA, Campus de Beaulieu, F-35042 Rennes, France tel: (33) 99 84 74 56 e-mail: fdupont at irisa.fr -------------------------------------------------------------------------------- "Dans toute entreprise serieuse, l'intelligence est un don negligeable."