Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -256,13 +256,12 @@ if (fmt == NULL) @throw [OFInvalidFormatException newWithClass: isa]; if ((vasprintf(&t, [fmt cString], args)) == -1) /* - * This is only the most likely error to happen. - * Unfortunately, as errno isn't always thread-safe, there's - * no good way for us to find out what really happened. + * This is only the most likely error to happen. Unfortunately, + * there is no good way to check what really happened. */ @throw [OFOutOfMemoryException newWithClass: isa]; @try { [self appendCString: t]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -463,11 +463,16 @@ } if ((t = vasprintf(&string, [fmt cString], args)) == -1) { c = isa; [super dealloc]; - @throw [OFInitializationFailedException newWithClass: c]; + + /* + * This is only the most likely error to happen. Unfortunately, + * there is no good way to check what really happened. + */ + @throw [OFOutOfMemoryException newWithClass: c]; } length = t; switch (of_string_check_utf8(string, length)) { case 1: