Class PullRequestOutOfDateException

All Implemented Interfaces:
Serializable

public class PullRequestOutOfDateException extends EntityOutOfDateException
A specialization of EntityOutOfDateException thrown when a PullRequest's version is out-of-date.
See Also:
  • Constructor Details

    • PullRequestOutOfDateException

      public PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nullable Throwable cause)
      Constructs a PullRequestOutOfDateException with unspecified versions. Because this constructor provides so little information, it should be avoided except in situaitons where there is simply no additional information available.
      Parameters:
      message - a message describing the error
      cause - the triggering exception, or null if no cause is available
    • PullRequestOutOfDateException

      public PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nonnull PullRequest pullRequest, int expectedVersion)
      Constructs a PullRequestOutOfDateException, providing the current PullRequest and the version that was expected.
      Parameters:
      message - a message describing the error
      pullRequest - the current pull request state
      expectedVersion - the expected pull request version, generally older (lower) than the current version
    • PullRequestOutOfDateException

      public PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nullable Throwable cause, @Nonnull PullRequest pullRequest, int expectedVersion)
      Constructs a PullRequestOutOfDateException, providing the current PullRequest and the version that was expected.
      Parameters:
      message - a message describing the error
      cause - the triggering exception, or null if no cause is available
      pullRequest - the current pull request state
      expectedVersion - the expected pull request version, generally older (lower) than the current version
  • Method Details

    • getPullRequest

      @Nullable public PullRequest getPullRequest()
      Retrieves the current state for the pull request, if it was available when the exception was thrown. When available, the version of the returned pull request will always match the current version.
      Returns:
      the current pull request, or null if the current state was not available