ca.idms.net
Class PacketException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by ca.idms.net.PacketException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PacketSequenceException, PacketTypeException, ProxyException

public class PacketException
extends java.io.IOException

Thrown to indicate that there is an error in the DSI packet protocol.

Version:
1.01, 09/20/05
Author:
Dave Ross
See Also:
Serialized Form

Constructor Summary
PacketException()
          Constructs a general PacketException with no detail message.
PacketException(int e)
          Constructs a new PacketException with the specified error code and no detail message.
PacketException(int e, java.lang.String s)
          Constructs a new PacketException with the specified error code and detail message.
PacketException(java.lang.String s)
          Constructs a general PacketException with the specified detail message.
 
Method Summary
 java.lang.String getDetailMessage()
          Returns the detail message.
 int getError()
          Gets PacketError detailed error code.
 java.lang.String getMessage()
          Returns the complete message.
 
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

PacketException

public PacketException()
Constructs a general PacketException with no detail message.


PacketException

public PacketException(java.lang.String s)
Constructs a general PacketException with the specified detail message.

Parameters:
s - the message.

PacketException

public PacketException(int e)
Constructs a new PacketException with the specified error code and no detail message. The message associated with the error code is returned in a NackPacket.

Parameters:
e - the error code.

PacketException

public PacketException(int e,
                       java.lang.String s)
Constructs a new PacketException with the specified error code and detail message. The detail message is appended to the message associated with the error code and returned in a NackPacket.

Parameters:
e - the error code.
s - the detail message.
Method Detail

getError

public int getError()
Gets PacketError detailed error code.

Returns:
error code.

getDetailMessage

public java.lang.String getDetailMessage()
Returns the detail message.

Returns:
the value returned by the super class getMessage() method.

getMessage

public java.lang.String getMessage()
Returns the complete message.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the concatenated standard and detail messages.


Copyright © 2009 CA, All rights reserved