mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-11 08:56:54 +01:00
23 lines
924 B
Objective-C
Executable File
23 lines
924 B
Objective-C
Executable File
//
|
||
// RSOPMLError.m
|
||
// RSParser
|
||
//
|
||
// Created by Brent Simmons on 2/28/16.
|
||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||
//
|
||
|
||
#import <RSParser/RSOPMLError.h>
|
||
|
||
NSString *RSOPMLErrorDomain = @"com.ranchero.OPML";
|
||
|
||
NSError *RSOPMLWrongFormatError(NSString *fileName) {
|
||
|
||
NSString *localizedDescriptionFormatString = NSLocalizedString(@"The file ‘%@’ can’t be parsed because it’s not an OPML file.", @"OPML wrong format");
|
||
NSString *localizedDescription = [NSString stringWithFormat:localizedDescriptionFormatString, fileName];
|
||
|
||
NSString *localizedFailureString = NSLocalizedString(@"The file is not an OPML file.", @"OPML wrong format");
|
||
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: localizedDescription, NSLocalizedFailureReasonErrorKey: localizedFailureString};
|
||
|
||
return [[NSError alloc] initWithDomain:RSOPMLErrorDomain code:RSOPMLErrorCodeDataIsWrongFormat userInfo:userInfo];
|
||
}
|