From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA00151 for caml-redistribution; Fri, 9 Jul 1999 03:11:08 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA01570 for ; Fri, 9 Jul 1999 02:18:46 +0200 (MET DST) Received: from firewall.f5.com (f5.com [207.17.117.200]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id CAA02379 for ; Fri, 9 Jul 1999 02:18:41 +0200 (MET DST) Received: by firewall.f5.com; id QAA04897; Thu, 8 Jul 1999 16:46:02 GMT Received: from knotwell.dev.net(192.168.101.138) by firewall.f5.com via smap (4.1) id xma004764; Thu, 8 Jul 99 16:45:08 GMT Received: (from knotwell@localhost) by knotwell.f5.com (8.9.3/8.9.3) id RAA12953; Thu, 8 Jul 1999 17:27:45 -0700 From: " MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14213.16897.231203.976296@knotwell.f5.com> Date: Thu, 8 Jul 1999 17:27:45 -0700 (PDT) To: Gerd.Stolpmann@darmstadt.netsurf.de Cc: knotwell@f5.com, caml-list@inria.fr Subject: Re: small code problem In-Reply-To: <99070901192505.28040@schneemann> References: <14205.15754.427409.474325@knotwell.f5.com> <99070901192505.28040@schneemann> X-Mailer: VM 6.71 under 21.2 "Boreas" XEmacs Lucid (beta10) Reply-To: knotwell@f5.com Sender: weis Gerd Stolpmann writes: > This solution avoids that Invalid_argument must be caught which is better > style. It is almost always a bad idea to trap Invalid_argument, > Out_of_memory, Stack_overflow, and Division_by_zero, as these exceptions > are thought as last resort that indicates a bad system state that must > not happen but happened. It is better to design the program such that > it never runs into conditions that raise these exceptions, and if they > happen nevertheless, you missed something. He Gerd-- This is a serious question (not an argumentative one). How do I avoid Invalid_argument when I'm expecting the user to enter a filename on the command-line? Or are you just talking in general? --Brad (who's wondering if he's missed the forest for the trees) > > Gerd