Package de.jplag

Class ParsingException

All Implemented Interfaces:
Serializable

public class ParsingException extends Exception
An exception to throw if any error occurred while parsing files in a language frontend.
See Also:
  • Constructor Details

    • ParsingException

      public ParsingException(File file)
      Constructs a new exception indicating a parsing exception in the given file without a specific reason.
      Parameters:
      file - the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)
    • ParsingException

      public ParsingException(File file, String reason)
      Constructs a new exception indicating a parsing exception in the given file with the given reason.
      Parameters:
      file - the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)
      reason - the reason the parsing failed. A null value is permitted.)
    • ParsingException

      public ParsingException(File file, Throwable cause)
      Constructs a new exception indicating a parsing exception in the given file with the given cause.
      Parameters:
      file - the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)
      cause - the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • ParsingException

      public ParsingException(File file, String reason, Throwable cause)
      Constructs a new exception indicating a parsing exception in the given file with the given reason and cause.
      Parameters:
      file - the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)
      reason - the reason the parsing failed. A null value is permitted.)
      cause - the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
  • Method Details

    • wrappingExceptions

      public static ParsingException wrappingExceptions(Collection<ParsingException> exceptions)
      Creates a new parsing exception which wraps the provided exceptions. If no exception to wrap is provided, null is returned. If only one exception is provided, it is returned.
      Parameters:
      exceptions - the collection of exceptions to wrap.
      Returns:
      a new parsing exception wrapping the provided exceptions, null if no exceptions are provided, or the provided exception if only one was provided.