Rename method to "emit" prefix instead of "report" in Input Stream errors for naming consistency
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user