home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
drdobbs
/
1988
/
02
/
porter
/
porter.ls2
< prev
Wrap
Text File
|
1979-12-31
|
768b
|
38 lines
Program cerrtest;
{ Test critical error handler }
Uses crt, dos, criterr;
Var testFile : text;
n, ignored : integer;
Begin
{$I-}
ClrScr;
InstallCEH;
For n := 1 to 10 do
Writeln ('This is output line ', n);
Assign (testFile, 'A:TEST.FIL');
Repeat
Rewrite (testFile);
Ignored := IOResult; { clear system error status }
Until criticalActionCode <> 'R';
Writeln ('After disk attempt, criticalErrorOccurred = ',
criticalErrorOccurred);
Writeln (' and criticalErrorCode = ', criticalErrorCode);
Writeln (' and criticalErrorDrive = ', criticalErrorDrive);
Writeln (' and criticalActionCode = ', criticalActionCode);
{$I+}
End.