Package com.atlassian.bitbucket.pull
Class PullRequestOutOfDateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.atlassian.bitbucket.ServiceException
com.atlassian.bitbucket.EntityOutOfDateException
com.atlassian.bitbucket.pull.PullRequestOutOfDateException
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.EntityOutOfDateException
UNKNOWN_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionPullRequestOutOfDateException(KeyedMessage message, PullRequest pullRequest, int expectedVersion) Constructs aPullRequestOutOfDateException, providing the currentPullRequestand the version that wasexpected.PullRequestOutOfDateException(KeyedMessage message, Throwable cause) Constructs aPullRequestOutOfDateExceptionwithunspecifiedversions.PullRequestOutOfDateException(KeyedMessage message, Throwable cause, PullRequest pullRequest, int expectedVersion) Constructs aPullRequestOutOfDateException, providing the currentPullRequestand the version that wasexpected. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the current state for the pull request, if it was available when the exception was thrown.Methods inherited from class com.atlassian.bitbucket.EntityOutOfDateException
getCurrentVersion, getExpectedVersionMethods inherited from class com.atlassian.bitbucket.ServiceException
getKeyedMessage, getLocalizedMessage, getMessageKeyMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PullRequestOutOfDateException
Constructs aPullRequestOutOfDateExceptionwithunspecifiedversions. 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 errorcause- the triggering exception, ornullif no cause is available
-
PullRequestOutOfDateException
public PullRequestOutOfDateException(@Nonnull KeyedMessage message, @Nonnull PullRequest pullRequest, int expectedVersion) Constructs aPullRequestOutOfDateException, providing the currentPullRequestand the version that wasexpected.- Parameters:
message- a message describing the errorpullRequest- the current pull request stateexpectedVersion- 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 aPullRequestOutOfDateException, providing the currentPullRequestand the version that wasexpected.- Parameters:
message- a message describing the errorcause- the triggering exception, ornullif no cause is availablepullRequest- the current pull request stateexpectedVersion- the expected pull request version, generally older (lower) than the current version
-
-
Method Details
-
getPullRequest
Retrieves the current state for the pull request, if it was available when the exception was thrown. When available, theversionof the returned pull request will always match thecurrent version.- Returns:
- the current pull request, or
nullif the current state was not available
-