mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Add lots of detail to exception on port registration failure.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14640 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
89663963e2
commit
2094f6f4a8
3 changed files with 25 additions and 4 deletions
|
@ -10,6 +10,8 @@
|
|||
adding lots of logging information. Also documented quite a bit.
|
||||
Resolved all conflicts found with Adam's change ... generally in
|
||||
favor of the most informative logging.
|
||||
* Source/NSPortNameServer.m: On failure to register name, make
|
||||
exception message provide lots of detail/advice for newbies.
|
||||
|
||||
2002-10-03 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
|
|
|
@ -1644,9 +1644,17 @@ static Class tcpPortClass;
|
|||
{
|
||||
NSMutableString *desc;
|
||||
|
||||
desc = [NSMutableString stringWithFormat: @"Host - %@\n", host];
|
||||
[desc appendFormat: @"Addr - %@\n", address];
|
||||
[desc appendFormat: @"Port - %d\n", portNum];
|
||||
desc = [NSMutableString stringWithFormat: @"NSPort on host with details -\n"
|
||||
@"%@\n", host];
|
||||
if (address == nil)
|
||||
{
|
||||
[desc appendFormat: @" IP address - any\n"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[desc appendFormat: @" IP address - %@\n", address];
|
||||
}
|
||||
[desc appendFormat: @" TCP port - %d\n", portNum];
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
|
|
@ -915,7 +915,18 @@ typedef enum {
|
|||
if (result == 0)
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
format: @"unable to register %@", name];
|
||||
format: @"Unable to register name '%@' for the port -\n%@\n"
|
||||
@"Typically, this might mean that a process is already running with the name\n"
|
||||
@"'%@' ...\n"
|
||||
@"Try the command -\n"
|
||||
@" gdomap -L '%@'\n"
|
||||
@"to find its network details.\n"
|
||||
@"Alternatively, it may have been shut down without unregistering, and\n"
|
||||
@"another process may be running using the same network port. If this is\n"
|
||||
@"the case, you can use -\n"
|
||||
@"gdomap -U '%@'\n"
|
||||
@"to remove the registration so that you can attempt this operation again.",
|
||||
name, port, name, name, name];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue