@@ -30,11 +30,11 @@ #import "OFFile.h" #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" -#import "OFUnboundNamespaceException.h" +#import "OFUnboundPrefixException.h" #import "autorelease.h" #import "macros.h" typedef void (*state_function)(id, SEL); @@ -124,13 +124,14 @@ return; attributeNS = namespace_for_prefix(attributePrefix, namespaces); if ((attributePrefix != nil && attributeNS == nil)) - @throw [OFUnboundNamespaceException + @throw [OFUnboundPrefixException exceptionWithClass: [self class] - prefix: attributePrefix]; + prefix: attributePrefix + parser: self]; [attribute->_namespace release]; attribute->_namespace = [attributeNS retain]; } @@ -580,13 +581,14 @@ OFString *namespace; namespace = namespace_for_prefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) - @throw [OFUnboundNamespaceException + @throw [OFUnboundPrefixException exceptionWithClass: [self class] - prefix: _prefix]; + prefix: _prefix + parser: self]; if ([_delegate respondsToSelector: @selector(parser: didStartElement:prefix:namespace:attributes:)]) [_delegate parser: self didStartElement: _name @@ -669,13 +671,14 @@ [_buffer removeAllItems]; namespace = namespace_for_prefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) - @throw [OFUnboundNamespaceException + @throw [OFUnboundPrefixException exceptionWithClass: [self class] - prefix: _prefix]; + prefix: _prefix + parser: self]; if ([_delegate respondsToSelector: @selector(parser:didEndElement:prefix:namespace:)]) [_delegate parser: self didEndElement: _name @@ -721,13 +724,14 @@ attributesCount = [_attributes count]; namespace = namespace_for_prefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) - @throw [OFUnboundNamespaceException + @throw [OFUnboundPrefixException exceptionWithClass: [self class] - prefix: _prefix]; + prefix: _prefix + parser: self]; for (j = 0; j < attributesCount; j++) resolve_attribute_namespace(attributesObjects[j], _namespaces, self);