Package com.atlassian.bamboo.repository
Class RepositoryException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.atlassian.bamboo.repository.RepositoryException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HostKeyVerificationException
,InvalidRepositoryException
,RepositoryBranchDeletedException
,StashRepositoryException
public class RepositoryException extends Exception
This class types repository errors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RepositoryException(@NotNull String message)
Deprecated.since 5.14 useRepositoryException(String, long)
RepositoryException(@NotNull String message, long repositoryId)
RepositoryException(@NotNull String message, @Nullable Throwable cause)
Create an exception containing the message and root causeRepositoryException(@Nullable Throwable cause)
Deprecated.since 5.14 useRepositoryException(String, long)
RepositoryException(@Nullable Throwable cause, long repositoryId)
RepositoryException(String message, @Nullable Throwable cause, String stdout, String stderr)
Create an exception containing the message, root cause and stdout/stderr output from external commandRepositoryException(String message, String stdout, String stderr)
Create an exception containing the message and stdout/stderr output from external commandRepositoryException(String message, Throwable cause, String stdout, String stderr, long repositoryId)
Create an exception containing the message, root cause, stdout/stderr output from external command and repositoryId
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Long
getRepositoryId()
Id of this exception's source.@Nullable String
getStderr()
@Nullable String
getStdout()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RepositoryException
@Deprecated public RepositoryException(@NotNull @NotNull String message)
Deprecated.since 5.14 useRepositoryException(String, long)
Create an exception containing the message- Parameters:
message
- The error message
-
RepositoryException
public RepositoryException(@NotNull @NotNull String message, long repositoryId)
-
RepositoryException
@Deprecated public RepositoryException(@Nullable @Nullable Throwable cause)
Deprecated.since 5.14 useRepositoryException(String, long)
-
RepositoryException
public RepositoryException(@Nullable @Nullable Throwable cause, long repositoryId)
-
RepositoryException
public RepositoryException(@NotNull @NotNull String message, @Nullable @Nullable Throwable cause)
Create an exception containing the message and root cause- Parameters:
message
- The error messagecause
- The root cause
-
RepositoryException
public RepositoryException(String message, String stdout, String stderr)
Create an exception containing the message and stdout/stderr output from external command- Parameters:
message
- The error messagestdout
- Command standard outputstderr
- Command standard error output
-
RepositoryException
public RepositoryException(String message, @Nullable @Nullable Throwable cause, String stdout, String stderr)
Create an exception containing the message, root cause and stdout/stderr output from external command- Parameters:
message
- The error messagecause
- The root causestdout
- Command standard outputstderr
- Command standard error output
-
RepositoryException
public RepositoryException(String message, Throwable cause, String stdout, String stderr, long repositoryId)
Create an exception containing the message, root cause, stdout/stderr output from external command and repositoryId- Parameters:
message
- The error messagecause
- The root causestdout
- Command standard outputstderr
- Command standard error outputrepositoryId
- id of repository
-
-
Method Detail
-
getStderr
@Nullable public @Nullable String getStderr()
- Returns:
- stderr output of external command
-
getStdout
@Nullable public @Nullable String getStdout()
- Returns:
- stdout output of external command
-
getRepositoryId
@Nullable public @Nullable Long getRepositoryId()
Id of this exception's source. It is null more often than not as Repository objects usually don't know it.- Returns:
- id of the repository that threw this exception or null if unknown
-
-