Class FileAnalysisException

    • Constructor Detail

      • FileAnalysisException

        public FileAnalysisException()
      • FileAnalysisException

        public FileAnalysisException​(String message)
      • FileAnalysisException

        public FileAnalysisException​(Throwable cause)
      • FileAnalysisException

        public FileAnalysisException​(String message,
                                     Throwable cause)
    • Method Detail

      • hasFileName

        protected boolean hasFileName()
      • getFileId

        public @NonNull FileId getFileId()
        The name of the file in which the error occurred.
      • getMessage

        public final String getMessage()
        Overrides:
        getMessage in class org.apache.commons.lang3.exception.ContextedRuntimeException
      • errorKind

        protected String errorKind()
      • wrap

        public static FileAnalysisException wrap​(@NonNull FileId fileId,
                                                 @NonNull String message,
                                                 @NonNull Throwable cause)
        Wraps the cause into an analysis exception. If it is itself an analysis exception, just returns it after setting the filename for context.
        Parameters:
        fileId - Filename
        message - Context message, if the cause is not a FileAnalysisException
        cause - Exception to wrap
        Returns:
        An exception