public class PullRequestOutOfDateException extends EntityOutOfDateException
UNKNOWN_VERSION| Constructor and Description |
|---|
PullRequestOutOfDateException(KeyedMessage message,
PullRequest pullRequest,
int expectedVersion)
Constructs a
PullRequestOutOfDateException, providing the current PullRequest and
the version that was expected. |
PullRequestOutOfDateException(KeyedMessage message,
Throwable cause)
Constructs a
PullRequestOutOfDateException with unspecified versions. |
PullRequestOutOfDateException(KeyedMessage message,
Throwable cause,
PullRequest pullRequest,
int expectedVersion)
Constructs a
PullRequestOutOfDateException, providing the current PullRequest and
the version that was expected. |
| Modifier and Type | Method and Description |
|---|---|
PullRequest |
getPullRequest()
Retrieves the current state for the pull request, if it was available when the exception was thrown.
|
getCurrentVersion, getExpectedVersiongetKeyedMessage, getLocalizedMessage, getMessageKeyaddSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nullable Throwable cause)
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.message - a message describing the errorcause - the triggering exception, or null if no cause is availablepublic PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nonnull PullRequest pullRequest, int expectedVersion)
PullRequestOutOfDateException, providing the current PullRequest and
the version that was expected.message - a message describing the errorpullRequest - the current pull request stateexpectedVersion - the expected pull request version, generally older (lower) than the current versionpublic PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nullable Throwable cause, @Nonnull PullRequest pullRequest, int expectedVersion)
PullRequestOutOfDateException, providing the current PullRequest and
the version that was expected.message - a message describing the errorcause - the triggering exception, or null if no cause is availablepullRequest - the current pull request stateexpectedVersion - the expected pull request version, generally older (lower) than the current version@Nullable public PullRequest getPullRequest()
version of the returned pull request will always match
the current version.null if the current state was not availableCopyright © 2020 Atlassian. All rights reserved.