* Minor fixes to glitches detected by the clang static analyzer.
* Added MYAnimatingSplitView class.
5 // Created by Jens Alfke on 4/28/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
12 @implementation NSHTTPURLResponse (MYUtilities)
15 - (NSError*) HTTPError
17 // HTTP status >= 300 is considered an error:
18 int status = self.statusCode;
20 NSString *reason = NSLocalizedStringFromTable( @"HTTP_ERROR_MESSAGE",@"UKCrashReporter",@"");
21 reason = [NSHTTPURLResponse localizedStringForStatusCode: status];
22 NSDictionary *info = $dict({NSLocalizedFailureReasonErrorKey,reason});
23 return [NSError errorWithDomain: MyHTTPErrorDomain code: status userInfo: info];
29 NSString* const MyHTTPErrorDomain = @"HTTP";
36 Copyright (c) 2008, Jens Alfke <jens@mooseyard.com>. All rights reserved.
38 Redistribution and use in source and binary forms, with or without modification, are permitted
39 provided that the following conditions are met:
41 * Redistributions of source code must retain the above copyright notice, this list of conditions
42 and the following disclaimer.
43 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
44 and the following disclaimer in the documentation and/or other materials provided with the
47 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
48 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
49 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRI-
50 BUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
51 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
52 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
53 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
54 THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.