Re: Find out what's wrong with an NSString?
Re: Find out what's wrong with an NSString?
- Subject: Re: Find out what's wrong with an NSString?
- From: Roarke Lynch <email@hidden>
- Date: Fri, 3 Jan 2003 22:04:10 -0500
Did you try:
if(passedString)
{
//string is valid, do stuff
}
On Friday, January 3, 2003, at 10:50 AM, Jan Van Boghout wrote:
So I am writing a parser, and at a given moment a pass a string to
another method to process it. The string I pass is filled with the
method [scanner scanUpToString:@">"
intoString:stringIAmPassingToTheOtherMethod] (where scanner is an
NSScanner). Now I randomly get crashes (I can open the same data twice
and it doesn't necessarily crash, but after opening a few docs I get a
certain crash with one of them), and I get the following exception:
Exception raised during posting of notification. Ignored. exception:
[NSPlaceholderMutableString initWithString:]: nil string (or other)
argument
Now when I get this, the app doesn't crash. When it does crash, it
happens in the line where I make a new NSMutableString from the passed
string. I've tried to check if the string is nil, but that doesn't
help. When I try to do a simple NSLog(@"%@",theString); , the app
crashes too. How can I determine whether I have a valid string here or
not? (Without crashing the app :)
Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.