com.ptc.edadata
Class ResponseException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.ptc.edadata.ResponseException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BOMResponseException, CleanupResponseException, EDAViewableResponseException, FileListResponseException, VerifyDesignResponseException

public abstract class ResponseException
extends Exception

Title: ResponseException

Description: This class is the superclass for Response class exceptions

Copyright: Copyright (c) 2004

Company: PTC

See Also:
Serialized Form

Field Summary
private  ResponseException m_reNextException
           
private  ResponseItem m_riItem
           
private  String m_strMessage
           
private  Throwable m_tNestedException
           
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
ResponseException()
          Constructs a ResponseException with nulls for message, causing item and nested exception.
ResponseException(String message)
          Constructs a new ResponseException with the specified detail message.
ResponseException(String message, ResponseItem item)
          Constructs a new ResponseException with the specified detail message and causing item.
ResponseException(String message, ResponseItem item, Throwable nestedException)
          Constructs a new ResponseException with the specified detail message causing item, and nested exception.
 
Method Summary
 ResponseItem getItem()
          Item that caused the exception
 String getMessage()
          Similar to java.lang.Throwable.getMessage().
 Throwable getNestedException()
          Cause of the exception (if any).
 ResponseException getNextException()
          Retrieves the exception chained to this ResponseException object.
 void setItem(ResponseItem item)
          Sets item that caused the exception
 void setMessage(String message)
          Sets error message.
 void setNestedException(Throwable nestedException)
          Set exception's cause (if any).
 void setNextException(ResponseException nextException)
          Adds an ResponseException object to the end of the chain.
 
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
 

Field Detail

m_riItem

private ResponseItem m_riItem

m_reNextException

private ResponseException m_reNextException

m_tNestedException

private Throwable m_tNestedException

m_strMessage

private String m_strMessage
Constructor Detail

ResponseException

public ResponseException()
Constructs a ResponseException with nulls for message, causing item and nested exception.
Error message may be subsequently initialized by a call to setMessage(String message)
Causing item may be subsequently initialized by a call to setItem(ResponseItem item)
Nested exception could be set by setNestedException(Throwable nestedException)


ResponseException

public ResponseException(String message)
Constructs a new ResponseException with the specified detail message.
Causing item may be subsequently initialized by a call to setItem(ResponseItem item)
Nested exception could be set by setNestedException(Throwable nestedException)

Parameters:
message - Error message

ResponseException

public ResponseException(String message,
                         ResponseItem item)
Constructs a new ResponseException with the specified detail message and causing item.
Nested exception could be set by setNestedException(Throwable nestedException)

Parameters:
message - Error message
item - Causing item

ResponseException

public ResponseException(String message,
                         ResponseItem item,
                         Throwable nestedException)
Constructs a new ResponseException with the specified detail message causing item, and nested exception.

Parameters:
message - Error message
item - Causing item
nestedException - Nested exception
Method Detail

getItem

public ResponseItem getItem()
Item that caused the exception

Returns:
Response item that caused the exception. Needed for the likely case if the exception is caught and handled outside the code actually forming the Response

setItem

public void setItem(ResponseItem item)
Sets item that caused the exception

Parameters:
item - - Response item that caused the exception. Needed for the likely case if the exception is caught and handled outside the code actually forming the Response

getNextException

public ResponseException getNextException()
Retrieves the exception chained to this ResponseException object.

Returns:
the next ResponseException object in the chain; null if there are none

setNextException

public void setNextException(ResponseException nextException)
Adds an ResponseException object to the end of the chain.

Parameters:
nextException - - the new exception that will be added to the end of the ResponseException chain

getNestedException

public Throwable getNestedException()
Cause of the exception (if any).
E.g., a FileNotFoundException that caused inability to proceed with the Response
Logics is like that of java.lang.Throwable.getCause(); the only reason to repeat is that getCause() is absent in JDK 1.3

Returns:
Exception's cause

setNestedException

public void setNestedException(Throwable nestedException)
Set exception's cause (if any).
Logics is like that of java.lang.Throwable.initCause(Throwable cause); the only reason to repeat is that initCause() is absent in JDK 1.3

Parameters:
nestedException - Exception's cause

getMessage

public String getMessage()
Similar to java.lang.Throwable.getMessage(). Introduced only to make ResponseException easily XML-deserializable

Returns:
Error message

setMessage

public void setMessage(String message)
Sets error message. Introduced to make ResponseException easily XML-serializable

Parameters:
message - Error message