jimm.twice.ice
Class IceFault

java.lang.Object
  extended byjimm.twice.ice.IceFault

public class IceFault
extends java.lang.Object

Holds a fault code and optional location URI string.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  int errorCode
           
protected  java.lang.String errorPhrase
           
protected  java.lang.String extraMessage
           
protected  java.lang.String location
           
 
Constructor Summary
IceFault(int code)
          Constructor.
IceFault(int code, java.lang.String extraMessage)
          Constructor.
IceFault(int code, java.lang.String extraMessage, java.lang.String location)
          Constructor.
 
Method Summary
 int getErrorCode()
          Returns the error code number.
 java.lang.String getErrorMessage()
           
 java.lang.String getErrorPhrase()
          Returns the error phrase.
 java.lang.String getLocation()
          Returns the location URI as a string.
 void setErrorMessage(java.lang.String msg)
           
 void setLocation(java.lang.String loc)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errorCode

protected int errorCode

location

protected java.lang.String location

errorPhrase

protected java.lang.String errorPhrase

extraMessage

protected java.lang.String extraMessage
Constructor Detail

IceFault

public IceFault(int code)
Constructor.

Parameters:
code - the ICE code number

IceFault

public IceFault(int code,
                java.lang.String extraMessage)
Constructor.

Parameters:
code - the ICE code number
extraMessage - an extra explanatory message; may be null

IceFault

public IceFault(int code,
                java.lang.String extraMessage,
                java.lang.String location)
Constructor.

Parameters:
code - the ICE code number
extraMessage - an extra explanatory message; may be null
location - the location URI as a string; may be null
Method Detail

getErrorCode

public int getErrorCode()
Returns the error code number.

Returns:
the error code number

getLocation

public java.lang.String getLocation()
Returns the location URI as a string. May be null.

Returns:
the location URI, as a string; may be null

setLocation

public void setLocation(java.lang.String loc)

getErrorPhrase

public java.lang.String getErrorPhrase()
Returns the error phrase. Lazily instantiates it.

Returns:
the error phrase

getErrorMessage

public java.lang.String getErrorMessage()

setErrorMessage

public void setErrorMessage(java.lang.String msg)

toString

public java.lang.String toString()