home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
STRLIST
/
DEMO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-03-11
|
860b
|
33 lines
Program Demo;
uses CritErr;
{ Demo - force a critical error }
{$I- }
Var
f : File;
IOError : Integer;
Begin
WriteLn('Please open the door of your A: drive '+
'- Press <Enter> when ready...');
ReadLn;
WriteLn('We now force a critical error...');
Assign(f, 'A:\BOGUS.!!!');
Reset(f, 1);
IOError := IOResult;
If IOError > 0 Then
Begin
WriteLn('I/O operation failed with return code: ', IOError);
If IOError >= 150 Then
With ExtError Do
Begin
WriteLn('Error: ', ExtErrorString(Code));
WriteLn('Locus: ', ExtErrorString(mLocus+Locus));
WriteLn('Action: ', ExtErrorString(mAction+Action));
WriteLn('Class: ', ExtErrorString(mClass+Class));
end
Else
WriteLn('A critical did not occur.');
end;
end.