@@ -23,20 +23,18 @@ #import "OFXMLElement.h" #import "common.h" @implementation OFUnboundNamespaceException -+ (instancetype)exceptionWithClass: (Class)class - namespace: (OFString*)namespace - element: (OFXMLElement*)element ++ (instancetype)exceptionWithNamespace: (OFString*)namespace + element: (OFXMLElement*)element { - return [[[self alloc] initWithClass: class - namespace: namespace - element: element] autorelease]; + return [[[self alloc] initWithNamespace: namespace + element: element] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -44,15 +42,14 @@ } abort(); } -- initWithClass: (Class)class - namespace: (OFString*)namespace - element: (OFXMLElement*)element +- initWithNamespace: (OFString*)namespace + element: (OFXMLElement*)element { - self = [super initWithClass: class]; + self = [super init]; @try { _namespace = [namespace copy]; _element = [element retain]; } @catch (id e) { @@ -72,11 +69,12 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"The namespace %@ is not bound in class %@", _namespace, _inClass]; + @"The namespace %@ is not bound in an element of type %@!", + _namespace, [_element class]]; } - (OFString*)namespace { OF_GETTER(_namespace, false)