Class SolverException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.tweetyproject.lp.asp.reasoner.SolverException
All Implemented Interfaces:
Serializable

public class SolverException extends Exception
This class models a generic exception for ASP (Answer Set Programming) solvers.

The `SolverException` is thrown when an error occurs in the context of an ASP solver. It contains both a textual message and a corresponding error code to indicate the specific type of error.

Authors: Thomas Vengels, Tim Janus

See Also:
  • Field Details

    • SE_ERROR

      public static final int SE_ERROR
      Error code indicating a general error.
      See Also:
    • SE_IO_FAILED

      public static final int SE_IO_FAILED
      Error code indicating an I/O failure.
      See Also:
    • SE_NO_BINARY

      public static final int SE_NO_BINARY
      Error code indicating that the binary could not be found.
      See Also:
    • SE_SYNTAX_ERROR

      public static final int SE_SYNTAX_ERROR
      Error code indicating a syntax error.
      See Also:
    • SE_CANNOT_OPEN_INPUT

      public static final int SE_CANNOT_OPEN_INPUT
      Error code indicating that the input file could not be opened.
      See Also:
    • SE_CANNOT_FIND_SOLVER

      public static final int SE_CANNOT_FIND_SOLVER
      Error code indicating that the solver could not be found.
      See Also:
    • SE_PERMISSIONS

      public static final int SE_PERMISSIONS
      Error code indicating insufficient permissions to execute the solver.
      See Also:
    • solverErrorText

      public final String solverErrorText
      The textual message associated with the exception.
    • solverErrorCode

      public final int solverErrorCode
      The error code associated with the exception.
  • Constructor Details

    • SolverException

      public SolverException(String text, int exceptionCode)
      Creates a new `SolverException` with the specified message and error code.
      Parameters:
      text - the text message describing the exception.
      exceptionCode - the error code indicating the type of error.
  • Method Details

    • toString

      public String toString()
      Returns a string representation of the exception, which is the textual message provided when the exception was created.
      Overrides:
      toString in class Throwable
      Returns:
      the textual message associated with the exception.