system.chdir/mkdir/rmdir no or wrong error-message
Original Reporter info from Mantis: hapr35
-
Reporter name: hapr35
Original Reporter info from Mantis: hapr35
- Reporter name: hapr35
Description:
applies to product version 2.6.4 too.
the following program,
provided that the chdir (or mkdir or rmdir) generates an error,
{1} {$i+}
{2} begin
{3} chdir(...); {or mkdir or rmdir}
{4} < some statements
{5} without i/o >
{6} writeln(...) {or flush or readln}
{7} end .
says:
Runtime error ... at ...
..... Main, line 6 of a.pas
(1) the reported line number is wrong, should be 3 instead of 6 .
(2) if line 6 is removed from the prog, then there is no
error message at all. this is also wrong.
(3) rmdir with a regular file (not directory) returns error no.20,
which is not described in users-guide/run-time-errors
and rtl-reference-guide/system.ioresult .
(4) with unit sysutils (1)(2)(3) apply as well.
(5) with unit sysutils the error message for error no.16/20 is:
Exception : Unknown Run-Time error: 016/020
the kind of this error is known:
for 16: Can not remove current directory
for 20: (as soon as item (3) is fixed)
(6) (I know, the following does not match the actual topic)
with unit sysutils the error message for error no.3 is:
EInOutError: Invalid filename
but that differs greatly from that, what users-guide/run-time-errors
and rtl-reference-guide/system.ioresult says:
Path not found