This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Improved exception message for Host_Error


GNAT.Sockets.Host_Error is the exception raised when a host name
or address lookup fails. This change improves the associated exception
message by including the offending name or address

The following test case must display:

raised GNAT.SOCKETS.HOST_ERROR : [1] Host not found: nonexistent-host

with GNAT.Sockets; use GNAT.Sockets;
procedure Get_Nonexistent_Host is
   Dummy : Host_Entry_Type := Get_Host_By_Name ("nonexistent-host");
begin
   null;
end Get_Nonexistent_Host;

Tested on x86_64-pc-linux-gnu, committed on trunk

2016-04-21  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Raise_Host_Error): Include additional Name parameter.


Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]