com.starteam.exceptions
Class ServerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.starteam.exceptions.ServerException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CommandAbortedException, ItemNotFoundException, LockingException, LogonException, ServerUnavailableException

public class ServerException
extends java.lang.RuntimeException

The ServerException class is a client side exception that is thrown when an error on the server is encountered.

See Also:
Serialized Form

Method Summary
 java.lang.Object getAuxData(java.lang.String key)
          Returns the auxiliary data for a given key.
 java.lang.String[] getAuxKeys()
          Returns an array of String keys to auxiliary exception data that can be passed to getAuxData().
 java.lang.String getClassName()
          Returns the server's class name for this exception.
 int getErrorCode()
          The exception's error code.
 java.lang.String getErrorMessage()
          The error message to be presented to the user.
 java.lang.String getErrorSource()
          The server's error source for the exception.
 int getLogEntry()
          The server log entry number for the error.
 java.lang.String getMessage()
          Returns this exceptions error message.
 java.lang.String getNonLocalizedMessage()
          The "default" (English) version of the error message.
 Server getServer()
          Return the server originating this exception
 DateTime getTimeLogged()
          The time at which the server logged the error.
 boolean isLogged()
          Returns true if the error has been logged by the server.
 void setErrorMessage(java.lang.String errorMessage)
          Replace the message string.
 java.lang.String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getClassName

public java.lang.String getClassName()
Returns the server's class name for this exception.

Returns:
the server's class name for this exception.

getErrorSource

public java.lang.String getErrorSource()
The server's error source for the exception.

Returns:
the error source for this exception.

getErrorMessage

public java.lang.String getErrorMessage()
The error message to be presented to the user. When sent from newer servers this message will be appropriate for the client's locale.

Returns:
the error message

getNonLocalizedMessage

public java.lang.String getNonLocalizedMessage()
The "default" (English) version of the error message.

Returns:
the error message

getServer

public Server getServer()
Return the server originating this exception

Returns:
the server originating this exception

getErrorCode

public int getErrorCode()
The exception's error code. It is only unique with respect top a given getClassName().

Returns:
the error code
See Also:
ServerException.getClassName()

isLogged

public boolean isLogged()
Returns true if the error has been logged by the server.

Returns:
true if the error was logged by the server.

getTimeLogged

public DateTime getTimeLogged()
The time at which the server logged the error. The DateTime double value will be 0.0 if the exception is not logged.

Returns:
the server time at which the error was logged

getLogEntry

public int getLogEntry()
The server log entry number for the error. -1 if not logged.

Returns:
the server log entry number for the error.

getAuxKeys

public java.lang.String[] getAuxKeys()
Returns an array of String keys to auxiliary exception data that can be passed to getAuxData().

Returns:
an array of String keys to any auxiliary data. Will not return null.
See Also:
ServerException.getAuxData(String)

getAuxData

public java.lang.Object getAuxData(java.lang.String key)
Returns the auxiliary data for a given key.

Parameters:
key - a key to auxiliary data
Returns:
auxiliary data for the specified key or null if the key was not found.
See Also:
ServerException.getAuxKeys()

getMessage

public java.lang.String getMessage()
Returns this exceptions error message. If the exception is not logged then only the error message is returned. If it is logged then all fields are included. This is intended to be a useful message to present to an end user.

Overrides:
getMessage in class java.lang.Throwable
Returns:
a human-readable message for this exception.

toString

public java.lang.String toString()
Returns a string representation of this exception.

Overrides:
toString in class java.lang.Throwable
Returns:
a string representation of this exception.

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)
Replace the message string.



StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.