<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 29-04-2018 23:55, Carlos E. R. via Lazarus wrote:<br>
<blockquote type="cite"
cite="mid:f87c8500-d197-9330-bdaf-cc29a6d8b1b1@telefonica.net">It
does not list the error 26 I got.
<pre wrap="">It is possible that there are different numbers on different operating
systems? That list seems to be related to Windows, but the link does not
say.
</pre>
</blockquote>
It's always possible to get the text of an OS error via
SysErrorMessage().<br>
<br>
Also note that the EInOutError codes in the range 0-99 represent OS
error conditions, which are different for Windows and Linux. At
least in Delphi they do.<br>
<br>
On Linux Showmessage(SysErrorMessage(26)) gives us:<br>
Text (code segment) file busy<br>
<br>
On Windows it gives:<br>
The specified disk or diskette cannot be accessed.<br>
<br>
Of course a program can generate an runtime error itself via
Error(Code) in which case the code didn't come from the OS and it
might mean something different.<br>
<br>
Small test-program will give you a list:<br>
var<br>
I: Integer;<br>
begin<br>
for I := 0 to 99 do<br>
begin<br>
Memo1.Lines.Add(Format('%d - %s', [I, SysErrorMessage(I)]));<br>
end;<br>
<br>
On Windows it gives:<br>
0 - The operation completed successfully.<br>
1 - Incorrect function.<br>
2 - The system cannot find the file specified.<br>
3 - The system cannot find the path specified.<br>
4 - The system cannot open the file.<br>
5 - Access is denied.<br>
6 - The handle is invalid.<br>
7 - The storage control blocks were destroyed.<br>
8 - Not enough storage is available to process this command.<br>
9 - The storage control block address is invalid.<br>
10 - The environment is incorrect.<br>
11 - An attempt was made to load a program with an incorrect format.<br>
12 - The access code is invalid.<br>
13 - The data is invalid.<br>
14 - Not enough storage is available to complete this operation.<br>
15 - The system cannot find the drive specified.<br>
16 - The directory cannot be removed.<br>
17 - The system cannot move the file to a different disk drive.<br>
18 - There are no more files.<br>
19 - The media is write protected.<br>
20 - The system cannot find the device specified.<br>
21 - The device is not ready.<br>
22 - The device does not recognize the command.<br>
23 - Data error (cyclic redundancy check).<br>
24 - The program issued a command but the command length is
incorrect.<br>
25 - The drive cannot locate a specific area or track on the disk.<br>
26 - The specified disk or diskette cannot be accessed.<br>
27 - The drive cannot find the sector requested.<br>
28 - The printer is out of paper.<br>
29 - The system cannot write to the specified device.<br>
30 - The system cannot read from the specified device.<br>
31 - A device attached to the system is not functioning.<br>
32 - The process cannot access the file because it is being used by
another process.<br>
33 - The process cannot access the file because another process has
locked a portion of the file.<br>
34 - <br>
35 - <br>
36 - Too many files opened for sharing.<br>
37 - <br>
38 - Reached the end of the file.<br>
39 - The disk is full.<br>
40 - <br>
41 - <br>
42 - <br>
43 - <br>
44 - <br>
45 - <br>
46 - <br>
47 - <br>
48 - <br>
49 - <br>
50 - The request is not supported.<br>
51 - Windows cannot find the network path. Verify that the network
path is correct and the destination computer is not busy or turned
off. If Windows still cannot find the network path, contact your
network administrator.<br>
52 - You were not connected because a duplicate name exists on the
network. If joining a domain, go to System in Control Panel to
change the computer name and try again. If joining a workgroup,
choose another workgroup name.<br>
53 - The network path was not found.<br>
54 - The network is busy.<br>
55 - The specified network resource or device is no longer
available.<br>
56 - The network BIOS command limit has been reached.<br>
57 - A network adapter hardware error occurred.<br>
58 - The specified server cannot perform the requested operation.<br>
59 - An unexpected network error occurred.<br>
60 - The remote adapter is not compatible.<br>
61 - The printer queue is full.<br>
62 - Space to store the file waiting to be printed is not available
on the server.<br>
63 - Your file waiting to be printed was deleted.<br>
64 - The specified network name is no longer available.<br>
65 - Network access is denied.<br>
66 - The network resource type is not correct.<br>
67 - The network name cannot be found.<br>
68 - The name limit for the local computer network adapter card was
exceeded.<br>
69 - The network BIOS session limit was exceeded.<br>
70 - The remote server has been paused or is in the process of being
started.<br>
71 - No more connections can be made to this remote computer at this
time because there are already as many connections as the computer
can accept.<br>
72 - The specified printer or disk device has been paused.<br>
73 - <br>
74 - <br>
75 - <br>
76 - <br>
77 - <br>
78 - <br>
79 - <br>
80 - The file exists.<br>
81 - <br>
82 - The directory or file cannot be created.<br>
83 - Fail on INT 24.<br>
84 - Storage to process this request is not available.<br>
85 - The local device name is already in use.<br>
86 - The specified network password is not correct.<br>
87 - The parameter is incorrect.<br>
88 - A write fault occurred on the network.<br>
89 - The system cannot start another process at this time.<br>
90 - <br>
91 - <br>
92 - <br>
93 - <br>
94 - <br>
95 - <br>
96 - <br>
97 - <br>
98 - <br>
99 - <br>
<br>
On Linux it gives:<br>
0 - Success<br>
1 - Operation not permitted<br>
2 - No such file or directory<br>
3 - No such process<br>
4 - Interrupted system call<br>
5 - I/O error<br>
6 - No such device or address<br>
7 - Arg list too long<br>
8 - Exec format error<br>
9 - Bad file number<br>
10 - No child processes<br>
11 - Try again<br>
12 - Out of memory<br>
13 - Permission denied<br>
14 - Bad address<br>
15 - Block device required<br>
16 - Device or resource busy<br>
17 - File exists<br>
18 - Cross-device link<br>
19 - No such device<br>
20 - Not a directory<br>
21 - Is a directory<br>
22 - Invalid argument<br>
23 - File table overflow<br>
24 - Too many open files<br>
25 - Not a typewriter<br>
26 - Text (code segment) file busy<br>
27 - File too large<br>
28 - No space left on device<br>
29 - Illegal seek<br>
30 - Read-only file system<br>
31 - Too many links<br>
32 - Broken pipe<br>
33 - Math argument out of domain of func<br>
34 - Math result not representable<br>
35 - Resource deadlock would occur<br>
36 - File name too long<br>
37 - No record locks available<br>
38 - Function not implemented<br>
39 - Directory not empty<br>
40 - Too many symbolic links encountered<br>
41 - Operation would block<br>
42 - No message of desired type<br>
43 - Identifier removed<br>
44 - Channel number out of range<br>
45 - Level 2 not synchronized<br>
46 - Level 3 halted<br>
47 - Level 3 reset<br>
48 - Link number out of range<br>
49 - Protocol driver not attached<br>
50 - No CSI structure available<br>
51 - Level 2 halted<br>
52 - Invalid exchange<br>
53 - Invalid request descriptor<br>
54 - Exchange full<br>
55 - No anode<br>
56 - Invalid request code<br>
57 - Invalid slot<br>
58 - File locking deadlock error<br>
59 - Bad font file format<br>
60 - Device not a stream<br>
61 - No data available<br>
62 - Timer expired<br>
63 - Out of streams resources<br>
64 - Machine is not on the network<br>
65 - Package not installed<br>
66 - Object is remote<br>
67 - Link has been severed<br>
68 - Advertise error<br>
69 - Srmount error<br>
70 - Communication error on send<br>
71 - Protocol error<br>
72 - Multihop attempted<br>
73 - RFS specific error<br>
74 - Not a data message<br>
75 - Value too large for defined data type<br>
76 - Name not unique on network<br>
77 - File descriptor in bad state<br>
78 - Remote address changed<br>
79 - Can not access a needed shared library<br>
80 - Accessing a corrupted shared library<br>
81 - .lib section in a.out corrupted<br>
82 - Attempting to link in too many shared libraries<br>
83 - Cannot exec a shared library directly<br>
84 - Illegal byte sequence<br>
85 - Interrupted system call should be restarted<br>
86 - Streams pipe error<br>
87 - Too many users<br>
88 - Socket operation on non-socket<br>
89 - Destination address required<br>
90 - Message too long<br>
91 - Protocol wrong type for socket<br>
92 - Protocol not available<br>
93 - Protocol not supported<br>
94 - Socket type not supported<br>
95 - Operation not supported on transport endpoint<br>
96 - Protocol family not supported<br>
97 - Address family not supported by protocol<br>
98 - Address already in use<br>
99 - Cannot assign requested address<br>
<br>
So, because of the differences in Windows and Linux it might be best
to always show the SysErrorMessage(code) too (if it is indeed an OS
error). It will generate a much clearer message.<br>
<br>
<i>Rik</i><br>
<br>
</body>
</html>