>Number: 1890 >Category: gnustep >Synopsis: Creating NSException subclasses without a name can cause problems >Confidential: no >Severity: serious >Priority: medium >Responsible: fedor >State: open >Class: sw-bug >Submitter-Id: unknown >Arrival-Date: Thu Sep 07 09:00:04 EDT 2000 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: net >Release: 0.6.6 >Environment: RedHat Linux 6.2, GNUstep 0.6.6 (specific problem occurs using GDL, Foundation extensions 0.8.6 and Guile interface) >Description: It is possible to create NSException subclasses without providing a name (for example, the categories in the libFoundation extensions NSException.m file allows you to initialize exceptions using initWithFormat:..., and this is used in the GDL). The problem is that code that expects -name to return a valid NSString (like the GNUstep-Guile interface) will crash when this occurs. I've made a change to the gstep/base/Source/NSException.m file to avoid this problem and ensure that -name always return a valid string (and I've done the same for -reason): circe% cvs diff NSException.m Index: NSException.m =================================================================== RCS file: /gnustep/gnustep/core/base/Source/NSException.m,v retrieving revision 1.27 diff -r1.27 NSException.m 121c121,122 < return _e_name; --- > if (_e_name) return _e_name; > else return NSStringFromClass([self class]); >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted:
