jetbrains.buildServer.vcs
Class VcsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by jetbrains.buildServer.vcs.VcsException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
IncrementalPatchImpossibleException, VcsFileNotFoundException

public class VcsException
extends java.lang.Exception

Exception is thrown when some problem occurred while processing vcs request.

See Also:
Serialized Form

Constructor Summary
VcsException()
          Default constructor.
VcsException(java.lang.String message)
          Constructor with a description.
VcsException(java.lang.String message, java.lang.Throwable cause)
          Constructor with a description and cause exception.
VcsException(java.lang.Throwable cause)
          Constructor with cause exception.
 
Method Summary
 java.lang.String getMessage()
           
 VcsRoot getRoot()
          Returns vcs root caused the problem.
 boolean isDetailed()
          Return true if additional details were provided for the exception
 boolean isRecoverable()
          Indicates whether this error is recoverable (if true then operation can be repeated)
 void prependMessage(java.lang.String prefix)
          Allows to prepend more specific message for the exception, to provide more details.
 void setRecoverable(boolean recoverable)
          Sets whether this error is recoverable or not (false by default).
 VcsException setRoot(VcsRoot root)
          Sets vcs root caused the problem.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VcsException

public VcsException()
Default constructor.


VcsException

public VcsException(java.lang.String message)
Constructor with a description.

Parameters:
message - problem description.

VcsException

public VcsException(java.lang.String message,
                    java.lang.Throwable cause)
Constructor with a description and cause exception.

Parameters:
message - problem description.
cause - cause exception.

VcsException

public VcsException(java.lang.Throwable cause)
Constructor with cause exception.

Parameters:
cause - cause exception.
Method Detail

getRoot

public VcsRoot getRoot()
Returns vcs root caused the problem.

Returns:
vcs root caused the problem.

setRoot

public VcsException setRoot(VcsRoot root)
Sets vcs root caused the problem. Usually it is being set internally by TeamCity.

Parameters:
root - vcs root caused the problem.
Returns:
the exception instance.

isRecoverable

public boolean isRecoverable()
Indicates whether this error is recoverable (if true then operation can be repeated)

Returns:
true if error is recoverable

setRecoverable

public void setRecoverable(boolean recoverable)
Sets whether this error is recoverable or not (false by default).

Parameters:
recoverable - true if error is recoverable

prependMessage

public void prependMessage(java.lang.String prefix)
Allows to prepend more specific message for the exception, to provide more details. Original message will be appendend to the given one.

Parameters:
prefix - prefix for the exception message

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

isDetailed

public boolean isDetailed()
Return true if additional details were provided for the exception

Returns:
see above
See Also:
prependMessage(String)