edu.uoc.pfc.j2ee.jalonsod.mtp
Class MTPException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by edu.uoc.pfc.j2ee.jalonsod.mtp.MTPException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfiguratorException

public class MTPException
extends java.lang.Exception

File: MTPException.java Created: 2012-04-28 Encapsulates errors in the framework.

Author:
José Alonso de Motta
See Also:
Serialized Form

Field Summary
(package private)  int errorCode
          The stage where the request has failed.
static int MTP_EXCEPTION_MODEL_MAPPER
          The request has thrown the exception during the modelMapper stage of the request.
static int MTP_EXCEPTION_MODEL_RUN
          The request has thrown the exception during the modelRun stage of the request.
static int MTP_EXCEPTION_NOERROR
          The request has no error.
static int MTP_EXCEPTION_REQUEST_DATA
          The request has thrown the exception creating the requestData object.
static int MTP_EXCEPTION_SECURITY_CHECK
          The request has thrown the exception during the AccessControl stage of the request.
static int MTP_EXCEPTION_VALIDATION
          The request has thrown the exception during the validator stage of the request.
static int MTP_EXCEPTION_VIEW_DISPATCHER
          The request has thrown the exception during the viewRun stage of the request.
static int MTP_EXCEPTION_VIEW_MAPPER
          The request has thrown the exception during the viewMapper stage of the request.
private static long serialVersionUID
           
 
Constructor Summary
MTPException(java.lang.String msg)
           
MTPException(java.lang.String msg, int errorCode)
           
MTPException(java.lang.String msg, java.lang.Throwable t)
           
MTPException(java.lang.String msg, java.lang.Throwable t, int errorCode)
           
 
Method Summary
 int getErrorCode()
           
 void setErrorCode(int errorCode)
           
 
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

MTP_EXCEPTION_NOERROR

public static final int MTP_EXCEPTION_NOERROR
The request has no error.

See Also:
Constant Field Values

MTP_EXCEPTION_REQUEST_DATA

public static final int MTP_EXCEPTION_REQUEST_DATA
The request has thrown the exception creating the requestData object.

See Also:
Constant Field Values

MTP_EXCEPTION_MODEL_MAPPER

public static final int MTP_EXCEPTION_MODEL_MAPPER
The request has thrown the exception during the modelMapper stage of the request.

See Also:
Constant Field Values

MTP_EXCEPTION_SECURITY_CHECK

public static final int MTP_EXCEPTION_SECURITY_CHECK
The request has thrown the exception during the AccessControl stage of the request.

See Also:
Constant Field Values

MTP_EXCEPTION_VALIDATION

public static final int MTP_EXCEPTION_VALIDATION
The request has thrown the exception during the validator stage of the request.

See Also:
Constant Field Values

MTP_EXCEPTION_MODEL_RUN

public static final int MTP_EXCEPTION_MODEL_RUN
The request has thrown the exception during the modelRun stage of the request.

See Also:
Constant Field Values

MTP_EXCEPTION_VIEW_MAPPER

public static final int MTP_EXCEPTION_VIEW_MAPPER
The request has thrown the exception during the viewMapper stage of the request.

See Also:
Constant Field Values

MTP_EXCEPTION_VIEW_DISPATCHER

public static final int MTP_EXCEPTION_VIEW_DISPATCHER
The request has thrown the exception during the viewRun stage of the request.

See Also:
Constant Field Values

errorCode

int errorCode
The stage where the request has failed. It's one of the MTP_EXCEPTION_* values.

Constructor Detail

MTPException

public MTPException(java.lang.String msg,
                    java.lang.Throwable t,
                    int errorCode)

MTPException

public MTPException(java.lang.String msg,
                    int errorCode)

MTPException

public MTPException(java.lang.String msg,
                    java.lang.Throwable t)

MTPException

public MTPException(java.lang.String msg)
Method Detail

getErrorCode

public int getErrorCode()

setErrorCode

public void setErrorCode(int errorCode)