Package com.igormaznitsa.jcp.exceptions
Class PreprocessorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.igormaznitsa.jcp.exceptions.PreprocessorException
-
- All Implemented Interfaces:
java.io.Serializable
public class PreprocessorException extends java.lang.RuntimeException
The exception allows to save some useful data about preprocessing files like the current include stack and the error string index- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private FilePositionInfo[]
includeStack
private java.lang.String
processingString
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description PreprocessorException(java.lang.String message, java.lang.String processedText, FilePositionInfo[] includeStack, java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
convertIncludeStackToString()
static PreprocessorException
extractPreprocessorException(java.lang.Throwable thr)
FilePositionInfo[]
getIncludeChain()
java.io.File
getProcessingFile()
java.lang.String
getProcessingString()
java.io.File
getRootFile()
int
getStringIndex()
private static java.lang.String
makeStackView(FilePositionInfo[] list, char fill)
static java.lang.String
referenceAsString(char fillChar, java.lang.Throwable thr)
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
processingString
private final java.lang.String processingString
-
includeStack
private final transient FilePositionInfo[] includeStack
-
-
Constructor Detail
-
PreprocessorException
public PreprocessorException(java.lang.String message, java.lang.String processedText, @MustNotContainNull FilePositionInfo[] includeStack, java.lang.Throwable cause)
-
-
Method Detail
-
getRootFile
public java.io.File getRootFile()
-
getProcessingFile
public java.io.File getProcessingFile()
-
getStringIndex
public int getStringIndex()
-
getProcessingString
public java.lang.String getProcessingString()
-
convertIncludeStackToString
private java.lang.String convertIncludeStackToString()
-
getIncludeChain
@MustNotContainNull public FilePositionInfo[] getIncludeChain()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
-
makeStackView
private static java.lang.String makeStackView(@MustNotContainNull FilePositionInfo[] list, char fill)
-
extractPreprocessorException
public static PreprocessorException extractPreprocessorException(java.lang.Throwable thr)
-
referenceAsString
public static java.lang.String referenceAsString(char fillChar, java.lang.Throwable thr)
-
-