@@ -28,15 +28,18 @@ #import "asprintf.h" @implementation OFStream - init { - self = [super init]; - - if (isa == [OFStream class]) - @throw [OFNotImplementedException newWithClass: isa + if (isa == [OFStream class]) { + Class c = isa; + [self release]; + @throw [OFNotImplementedException newWithClass: c selector: _cmd]; + } + + self = [super init]; cache = NULL; wBuffer = NULL; return self; @@ -314,11 +317,11 @@ @try { ret = [OFString stringWithCString: ret_c encoding: encoding length: ret_len]; - } @catch (OFException *e) { + } @catch (id e) { /* * Append data to cache to * prevent loss of data due to * wrong encoding. */