@@ -98,19 +98,12 @@ open class HTMLSAXParser {
9898 case error( message: String )
9999 }
100100
101- public enum ErrorLevel : Int {
102- case none = 0
103- case warning = 1
104- case error = 2
105- case fatal = 3
106- }
107-
108101 public enum Error : Swift . Error {
109102 case unknown
110103 case unsupportedCharEncoding
111104 case stringEncodingConversion
112105 case emptyDocument
113- case parsingFailure( level : ErrorLevel , location: Location , message: String )
106+ case parsingFailure( location: Location , message: String )
114107 }
115108
116109 public typealias EventHandler = ( HTMLSAXParseContext , Event ) -> Void
@@ -134,7 +127,7 @@ open class HTMLSAXParser {
134127
135128 - Parameter string: The string containing the HTML content.
136129 - Parameter handler: The event handler closure that will be called during parsing.
137- - Throws: `HTMLParser.Error` if an error occured during parsing.
130+ - Throws: `HTMLParser.Error` if a fatal error occured during parsing.
138131 */
139132 open func parse( string: String , handler: @escaping EventHandler ) throws {
140133 guard let uft8Data = string. data ( using: . utf8) else {
@@ -159,7 +152,7 @@ open class HTMLSAXParser {
159152 - Parameter encoding: The character encoding to interpret the data. If no encoding
160153 is given then the parser will attempt to detect the encoding.
161154 - Parameter handler: The event handler closure that will be called during parsing.
162- - Throws: `HTMLParser.Error` if an error occured during parsing.
155+ - Throws: `HTMLParser.Error` if a fatal error occured during parsing.
163156 */
164157 open func parse( data: Data , encoding: String . Encoding ? = nil , handler: @escaping EventHandler ) throws {
165158 let dataLength = data. count
0 commit comments