Class AbortExecutionException

All Implemented Interfaces:
GraphQLError, Serializable

@PublicApi public class AbortExecutionException extends GraphQLException implements GraphQLError
This Exception indicates that the current execution should be aborted.
See Also:
  • Constructor Details

    • AbortExecutionException

      public AbortExecutionException()
    • AbortExecutionException

      public AbortExecutionException(Collection<GraphQLError> underlyingErrors)
    • AbortExecutionException

      public AbortExecutionException(String message)
    • AbortExecutionException

      public AbortExecutionException(String message, Throwable cause)
    • AbortExecutionException

      public AbortExecutionException(Throwable cause)
  • Method Details

    • getLocations

      public List<SourceLocation> getLocations()
      Specified by:
      getLocations in interface GraphQLError
      Returns:
      the location(s) within the GraphQL document at which the error occurred. Each SourceLocation describes the beginning of an associated syntax element
    • getErrorType

      public ErrorType getErrorType()
      Specified by:
      getErrorType in interface GraphQLError
      Returns:
      an object classifying this error
    • getUnderlyingErrors

      public List<GraphQLError> getUnderlyingErrors()
      Returns:
      a list of underlying errors, which may be empty
    • toExecutionResult

      public ExecutionResult toExecutionResult()
      This is useful for turning this abort signal into an execution result which is an error state with the underlying errors in it.
      Returns:
      an execution result with the errors from this exception