[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception handling with NSURL

From: Philippe Roussel
Subject: Re: Exception handling with NSURL
Date: Thu, 06 Dec 2007 10:51:35 +0100

Le jeudi 06 décembre 2007 à 09:32 +0000, Richard Frith-Macdonald a
écrit :
> My guess is that you are misinterpreting what's happening.
> Probably the reason the NSLog() in the exception handler is not called 
> is because the handler is not called because the exception is not 
> ocurring in this piece of code.  The exception message 'illegal 
> character in port part' does not correspond to a URL for the form 
> 'http://user:address@hidden' because such a URL has no port part, so it's 
> presumably being raised because some otyher URL used elsewhere in the 
> program has a port part containing an illegal character.

Well, I have to disagree : see NSURL.m line 837. I want to type
http://philou:address@hidden/ but when parsing philou: NSURL thinks it's
a hostname followed by a port and is expecting a numeric value.

My code used to function (NSURL URLWithString returning nil with a non
valid string) until I updated to trunk yesterday or two days ago. I did
an update 10 minutes ago and got a modification on NSException.m. Now
the exception only logs <NSException: 0x84c4e88> NAME:NSGenericException
REASON:illegal character in port part INFO:(nil) instead of the previous
big blob but the problem remains.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]