Class CSSParseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CSSMediaParseException, CSSNamespaceParseException

public class CSSParseException extends CSSException
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 Details

    • CSSParseException

      public CSSParseException(String message, Locator locator, Throwable cause)
      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. If null, the cause is unknown.
    • CSSParseException

      public CSSParseException(String message, Locator locator)
      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

      public Locator 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 at 1.
      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 at 1.
      Returns:
      the line number where the error was triggered, or -1 if that information is unavailable.