diff --git a/ChangeLog b/ChangeLog index 1f2f793b..bf383c8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-09-07 Gregory John Casamento + + * GormInspectorsManager.m: Similar to the previous check. Modified + -[ok:] such that if a connection is established and for any reason + causes an exception, the connection is removed and an error message + is displayed describing what caused the connection to fail. + 2003-09-07 Gregory John Casamento * GormInspectorsManager.m: Added check in -[ok:] to determine if diff --git a/GormInspectorsManager.m b/GormInspectorsManager.m index 2a76ed62..70f81b0a 100644 --- a/GormInspectorsManager.m +++ b/GormInspectorsManager.m @@ -1054,7 +1054,7 @@ selectCellWithString: (NSString*)title if([currentConnector destination] == nil) { NSRunAlertPanel(_(@"Problem making connection"), - _(@"You must select a valid destination"), + _(@"Please select a valid destination."), _(@"OK"), nil, nil, nil); } else if ([connectors containsObject: currentConnector] == YES) @@ -1117,7 +1117,16 @@ selectCellWithString: (NSString*)title && [[currentConnector destination] isKindOfClass: [GormObjectProxy class]] == NO) { - [currentConnector establishConnection]; + NS_DURING + [currentConnector establishConnection]; + NS_HANDLER + NSString *msg = [NSString stringWithFormat: @"Cannot establish connection: %@", + [localException reason]]; + // get rid of the bad connector and recover. + [[(id)NSApp activeDocument] removeConnector: currentConnector]; + NSRunAlertPanel(_(@"Problem making connection"), msg, + _(@"OK"),nil,nil,nil); + NS_ENDHANDLER } /*