From: ccrause@ing.sun.ac.za (Christo Crause) Subject: Re: Exception EInOutError Date: 26 Feb 1999 00:00:00 GMT Message-ID: <7b5v6q$a5p$5@news.adamastor.ac.za> References: <36D553B8.4B4792EF@aon.at> Content-Type: Text/Plain; charset=US-ASCII Organization: Dept. Chem. Eng. Mime-Version: 1.0 Newsgroups: alt.lang.delphi In article <36D553B8.4B4792EF@aon.at>, gottfried.pauler@aon.at says... > >I am new to Delphi - please help! > >When using the Exception EInOutError I want to get the specific >error-code of the IO - how to do this? One can access the error string returned by the exception as follows: try AssignFile(...); except on E: EInOutError do ShowMessage(E.Message); end; You can then use pos and copy to extract the error code from the string, since the error string has a standard format. Another option is to turn off IO checking and check IOResult after each IO call. -- Christo Crause Thermal Separations Research University of Stellenbosch South Africa