function ErrorString(e: Integer): string;
begin
case e of
1: Result := 'Invalid function number';
2: Result := 'File not found.';
3: Result := 'Path not found.';
4: Result := 'Too many open files.';
5: Result := 'Access denied.';
6: Result := 'Invalid file handle.';
12: Result := 'Invalid file-access mode.';
15: Result := 'Invalid disk number.';
16: Result := 'Cannot remove current directory.';
17: Result := 'Cannot rename across volumes.';
100: Result := 'Error when reading from disk.';
101: Result := 'Error when writing to disk.';
102: Result := 'File not assigned.';
103: Result := 'File not open.';
104: Result := 'File not opened for input.';
105: Result := 'File not opened for output.';
106: Result := 'Invalid number.';
150: Result := 'Disk is write protected.';
151: Result := 'Unknown device.';
152: Result := 'Drive not ready.';
153: Result := 'Unknown command.';
154: Result := 'CRC check failed.';
155: Result := 'Invalid drive specified..';
156: Result := 'Seek error on disk.';
157: Result := 'Invalid media type.';
158: Result := 'Sector not found.';
159: Result := 'Printer out of paper.';
160: Result := 'Error when writing to device.';
161: Result := 'Error when reading from device.';
162: Result := 'Hardware failure.';
200: Result := 'Division by zero';
201: Result := 'Range check error';
202: Result := 'Stack overflow error';
203: Result := 'Heap overflow error';
204: Result := 'Invalid pointer operation';
205: Result := 'Floating point overflow';
206: Result := 'Floating point underflow';
207: Result := 'Invalid floating point operation';
210: Result := 'Object not initialized';
211: Result := 'Call to abstract method';
212: Result := 'Stream registration error';
213: Result := 'Collection index out of range';
214: Result := 'Collection overflow error';
215: Result := 'Arithmetic overflow error';
216: Result := 'General protection fault';
end;
end;