com.ptc.edadata
Class RequestException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.ptc.edadata.RequestException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BoardRequestException, BOMRequestException, CleanupRequestException, EDAViewableRequestException, ExtraOptionsNeededException, InternalErrorException, InvalidRequestItemException, SchematicRequestException, VerifyDesignRequestException

public abstract class RequestException
extends Exception

Title: RequestException

Description: This class is the superclass for Request class exceptions

Copyright: Copyright (c) 2004

Company: PTC

See Also:
Serialized Form

Field Summary
private  RequestException m_reNextException
           
private  RequestItem 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
RequestException()
          Constructs a RequestException with nulls for message, causing item and nested exception.
RequestException(String message)
          Constructs a new RequestException with the specified detail message.
RequestException(String message, RequestItem item)
          Constructs a new RequestException with the specified detail message and causing item.
RequestException(String message, RequestItem item, Throwable nestedException)
          Constructs a new RequestException with the specified detail message causing item, and nested exception.
 
Method Summary
 RequestItem getItem()
          Item that caused the exception
 String getMessage()
          Similar to java.lang.Throwable.getMessage().
 Throwable getNestedException()
          Cause of the exception (if any).
 RequestException getNextException()
          Retrieves the exception chained to this RequestException object.
 void setItem(RequestItem 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(RequestException nextException)
          Adds an RequestException 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 RequestItem m_riItem

m_reNextException

private RequestException m_reNextException

m_tNestedException

private Throwable m_tNestedException

m_strMessage

private String m_strMessage
Constructor Detail

RequestException

public RequestException()
Constructs a RequestException 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(RequestItem item)
Nested exception could be set by setNestedException(Throwable nestedException)


RequestException

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

Parameters:
message - Error message

RequestException

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

Parameters:
message - Error message
item - Causing item

RequestException

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

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

getItem

public RequestItem getItem()
Item that caused the exception

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

setItem

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

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

getNextException

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

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

setNextException

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

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

getNestedException

public Throwable getNestedException()
Cause of the exception (if any).
E.g., a FileNotFoundException that caused inability to proceed with the Request
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 RequestException easily XML-deserializable

Returns:
Error message

setMessage

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

Parameters:
message - Error message