mymobilesite.communication
Class MessageException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by mymobilesite.communication.MessageException
All Implemented Interfaces:
java.io.Serializable

public class MessageException
extends java.lang.Exception

This class is responsible for holding the exceptions encountered in the message classes.

Author:
Gunn Olaussen & Kirsti N. Torgersen
See Also:
Serialized Form

Field Summary
private  int errorCode
           
 
Constructor Summary
MessageException(int errorCode)
          Constructor that creates an exception with a message based on the errorCode.
MessageException(int errorCode, java.lang.String msg)
          Constructor that creates an exception with a customised message.
 
Method Summary
 int getErrorCode()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

errorCode

private int errorCode
Constructor Detail

MessageException

public MessageException(int errorCode)
Constructor that creates an exception with a message based on the errorCode.

Parameters:
errorCode - int The error code describing the situation. Must be one of the constants in Language beginning with "ERROR_".

MessageException

public MessageException(int errorCode,
                        java.lang.String msg)
Constructor that creates an exception with a customised message.

Parameters:
errorCode - int The error code describing the situation. Must be one of the constants in Language beginning with "ERROR_".
Method Detail

getErrorCode

public int getErrorCode()
Returns:
int The error code for this exception.