Package com.oorian.html.parser
Class HtmlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.oorian.html.parser.HtmlParseException
- All Implemented Interfaces:
Serializable
Exception thrown when HTML5 parsing fails.
This exception is thrown by the HTML5 parser when it encounters invalid HTML structure, null/empty input, or other parsing errors. It optionally captures line and column information to help identify the location of the error in the source HTML.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHtmlParseException(String message) Creates a new parse exception with an error message.HtmlParseException(String message, int line, int column) Creates a new parse exception with message and position information.HtmlParseException(String message, int line, int column, Throwable cause) Creates a new parse exception with message, position, and underlying cause.HtmlParseException(String message, Throwable cause) Creates a new parse exception with an error message and underlying cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HtmlParseException
Creates a new parse exception with an error message.- Parameters:
message- the error message describing what went wrong.
-
HtmlParseException
Creates a new parse exception with an error message and underlying cause.- Parameters:
message- the error message describing what went wrong.cause- the underlying exception that caused the parse failure.
-
HtmlParseException
Creates a new parse exception with message and position information.- Parameters:
message- the error message describing what went wrong.line- the line number where the error occurred (1-based).column- the column number where the error occurred (1-based).
-
HtmlParseException
Creates a new parse exception with message, position, and underlying cause.- Parameters:
message- the error message describing what went wrong.line- the line number where the error occurred (1-based).column- the column number where the error occurred (1-based).cause- the underlying exception that caused the parse failure.
-
-
Method Details
-
getLine
public int getLine()Gets the line number where the parsing error occurred.- Returns:
- the line number (1-based), or -1 if line information is not available.
-
getColumn
public int getColumn()Gets the column number where the parsing error occurred.- Returns:
- the column number (1-based), or -1 if column information is not available.
-