Added URLUtils. Rewrote Target.
5 // Copyright 2008 Jens Alfke. All rights reserved.
12 @interface NSObject (With)
13 - (BOOL) endWith: (NSException*)x;
17 void _catchWith( id with, NSException *x )
19 Warn(@"Exception thrown from WITH(%@) block: %@",[with class],x);
20 if( [with respondsToSelector: @selector(endWith:)] ) {
21 if( ! [with endWith: x] )
22 @throw x; // propagate the exception if -endWith: returns NO
30 @implementation NSAutoreleasePool (With)
31 + (NSAutoreleasePool*) beginWith {return [self new];}
32 - (void) endWith {[self drain];}
33 - (BOOL) endWith: (NSException*)x {[self drain]; return YES;}