java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.sf.carte.doc.style.css.nsac.CSSException
io.sf.carte.doc.style.css.nsac.CSSParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CSSMediaParseException
,CSSNamespaceParseException
CSS parse exception.
This kind of exception is expected to have a locator providing the location (in the CSS document) where the issue was triggered.
Based on SAC's CSSParseException
class by Philippe Le Hegaret.
- See Also:
-
Constructor Summary
ConstructorDescriptionCSSParseException
(String message, Locator locator) Construct a CSS parse exception that has a location and a descriptive message.CSSParseException
(String message, Locator locator, Throwable cause) Construct a CSS parse exception that has a cause, a location and a descriptive message. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the column number where the error was triggered, starting at1
.int
Get the line number where the error was triggered, starting at1
.Get the locator pointing to the place where the error was triggered.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CSSParseException
Construct a CSS parse exception that has a cause, a location and a descriptive message.- Parameters:
message
- the descriptive message.locator
- the location where the error was triggered.cause
- the cause. Ifnull
, the cause is unknown.
-
CSSParseException
Construct a CSS parse exception that has a location and a descriptive message.- Parameters:
message
- the descriptive message.locator
- the location where the error was triggered.
-
-
Method Details
-
getLocator
Get the locator pointing to the place where the error was triggered.- Returns:
- the locator for the error, or null if there is no available locator.
-
getColumnNumber
public int getColumnNumber()Get the column number where the error was triggered, starting at1
.- Returns:
- the column number where the error was triggered, or
-1
if that information is unavailable.
-
getLineNumber
public int getLineNumber()Get the line number where the error was triggered, starting at1
.- Returns:
- the line number where the error was triggered, or
-1
if that information is unavailable.
-