Version française
Home     About     Download     Resources     Contact us    
Browse thread
small code problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: <Brad Knotwell <knotwell@f...>
Subject: Re: small code problem
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