Class CSSCompressor.MinificationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.iizix.js.build.compressors.CSSCompressor.MinificationException
All Implemented Interfaces:
Serializable
Enclosing class:
CSSCompressor

public static class CSSCompressor.MinificationException extends Exception
Exception thrown when a web resource can't be minified. Its message says what went wrong, and where, such as "Unterminated comment at line 12, column 5", and line() and column() return where.
Author:
paulh
See Also:
  • Constructor Details

    • MinificationException

      public MinificationException(String message, int line, int column)
      Constructor taking what went wrong, and where.
      Parameters:
      message - what went wrong, such as "Unterminated comment"
      line - the line at which it went wrong, numbered from 1
      column - the column at which it went wrong, numbered from 1
    • MinificationException

      public MinificationException(String message, String source, int index)
      Constructor taking what went wrong, and where, as an index into the source being minified. The line and column are worked out from index, counting "\n", "\r\n" and "\r" as line breaks.
      Parameters:
      message - what went wrong, such as "Unterminated comment"
      source - the source being minified
      index - the index in source at which it went wrong
      Throws:
      IndexOutOfBoundsException - if index is negative, or greater than the length of source
  • Method Details

    • line

      public int line()
      Returns the line at which minification failed, numbered from 1.
      Returns:
      the line at which minification failed
    • column

      public int column()
      Returns the column at which minification failed, numbered from 1.
      Returns:
      the column at which minification failed