Rename method to "emit" prefix instead of "report" in Input Stream errors for naming consistency

This commit is contained in:
iska
2014-10-04 21:57:23 +02:00
parent 19ae5b0516
commit 0519ff597d
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -21,8 +21,8 @@ typedef void (^ HTMLStreamReaderErrorCallback)(NSError *error);
@interface HTMLInputStreamReaderErrors : NSObject
+ (void)reportParseError:(HTMLStreamReaderError)parseError
atLocation:(NSUInteger)location
andCallback:(HTMLStreamReaderErrorCallback)callback;
+ (void)emitParseError:(HTMLStreamReaderError)parseError
atLocation:(NSUInteger)location
andCallback:(HTMLStreamReaderErrorCallback)callback;
@end
+2 -2
View File
@@ -26,7 +26,7 @@ static inline NSString * ReasonStringForError(HTMLStreamReaderError error)
@implementation HTMLInputStreamReaderErrors
+ (void)reportParseError:(HTMLStreamReaderError)parseError atLocation:(NSUInteger)location andCallback:(HTMLStreamReaderErrorCallback)callback
+ (void)emitParseError:(HTMLStreamReaderError)parseError atLocation:(NSUInteger)location andCallback:(HTMLStreamReaderErrorCallback)callback
{
if (callback == nil) return;
@@ -38,7 +38,7 @@ static inline NSString * ReasonStringForError(HTMLStreamReaderError error)
NSError *error = [[NSError alloc] initWithDomain:HTMLStreamReaderErrorDomain
code:parseError
userInfo:userInfo];
callback(error);
if (callback) callback(error);
}
@end