From 0519ff597d685e5d80c0bc11fe4e55098d02ff82 Mon Sep 17 00:00:00 2001 From: iska Date: Sat, 4 Oct 2014 21:57:23 +0200 Subject: [PATCH] Rename method to "emit" prefix instead of "report" in Input Stream errors for naming consistency --- HTMLKit/HTMLInputStreamReaderErrors.h | 6 +++--- HTMLKit/HTMLInputStreamReaderErrors.m | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HTMLKit/HTMLInputStreamReaderErrors.h b/HTMLKit/HTMLInputStreamReaderErrors.h index 4bbc760..41a5e9a 100644 --- a/HTMLKit/HTMLInputStreamReaderErrors.h +++ b/HTMLKit/HTMLInputStreamReaderErrors.h @@ -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 diff --git a/HTMLKit/HTMLInputStreamReaderErrors.m b/HTMLKit/HTMLInputStreamReaderErrors.m index e6399c5..f900c45 100644 --- a/HTMLKit/HTMLInputStreamReaderErrors.m +++ b/HTMLKit/HTMLInputStreamReaderErrors.m @@ -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