题
当我试图打开一个文件写入到我得到一个Ada.IO_Exceptions.Name_Error。
在过程调用的 Ada.Text_IO.Open 强>
的文件名是 “C:\ CC_TEST_LOG.TXT”。该文件不存在。
这是在Windows XP在NTFS分区。用户有权创建和写入该目录。 文件名是井的WIN32最大路径长度下。
name_2 : String := "C:\CC_TEST_LOG.TXT"
if name_2'last > name_2'first then
begin
Ada.Text_IO.Open(file, Ada.Text_IO.Out_File, name_2);
Ada.Text_IO.Put_Line(
"CC_Test_Utils: LogFile: ERROR: Open, File "
& name_2);
return;
exception
when The_Error : others =>
Ada.Text_IO.Put_Line(
"CC_Test_Utils: LogFile: ERROR: Open Failed; "
& Ada.Exceptions.Exception_Name(The_Error)
& ", File " & name_2);
end;
end if;
不隶属于 StackOverflow