Class ServiceException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServiceException
    extends java.lang.Exception
    This exception is thrown when the operation performed by service fails.
    See Also:
    Serialized Form
    • Field Detail

      • INIT_GENERAL

        public static final int INIT_GENERAL
        Initialization errors
        See Also:
        Constant Field Values
      • CANNOT_LOAD_SERVICES_INF

        public static final int CANNOT_LOAD_SERVICES_INF
        See Also:
        Constant Field Values
      • SERVICE_NOT_AVAILABLE

        public static final int SERVICE_NOT_AVAILABLE
        Service is not available
        See Also:
        Constant Field Values
      • SERVICE_INIT_FAILED

        public static final int SERVICE_INIT_FAILED
        Could not initialize service
        See Also:
        Constant Field Values
      • IMPLPROXY_NOT_AVAILABLE

        public static final int IMPLPROXY_NOT_AVAILABLE
        An implementor proxy is not available
        See Also:
        Constant Field Values
      • SERVICEIMPL_INIT_FAILED

        public static final int SERVICEIMPL_INIT_FAILED
        Could not initialize service implementor
        See Also:
        Constant Field Values
      • INVALID_DEFAULT_IMPL

        public static final int INVALID_DEFAULT_IMPL
        The implementation specified in the services definition does not implement the correct implementor interface
        See Also:
        Constant Field Values
      • OPERATION_NOT_SUPPORTED

        public static final int OPERATION_NOT_SUPPORTED
        The operation not supported by the current service implementation
        See Also:
        Constant Field Values
      • NO_SERVICE_DEF

        public static final int NO_SERVICE_DEF
        Service is not defined in the services definition
        See Also:
        Constant Field Values
      • OPERATION_SINGATURE_MISMATCH

        public static final int OPERATION_SINGATURE_MISMATCH
        Operation signature mistmatch
        See Also:
        Constant Field Values
      • CLASS_NOT_FOUND

        public static final int CLASS_NOT_FOUND
        Class not found
        See Also:
        Constant Field Values
      • INSTANTIATION_EXCEPTION

        public static final int INSTANTIATION_EXCEPTION
        Instantiation exception
        See Also:
        Constant Field Values
      • NO_IMPL_DEF

        public static final int NO_IMPL_DEF
        The service does not have an implementation defined
        See Also:
        Constant Field Values
      • CANNOT_CREATE_IMPL

        public static final int CANNOT_CREATE_IMPL
        Could not create implementation
        See Also:
        Constant Field Values
      • INVALID_PARAMETER_LIST

        public static final int INVALID_PARAMETER_LIST
        Invalid parameter list
        See Also:
        Constant Field Values
      • OPERATION_FAILED

        public static final int OPERATION_FAILED
        Operation failed
        See Also:
        Constant Field Values
      • INVALID_OPERATION

        public static final int INVALID_OPERATION
        Operation not supported
        See Also:
        Constant Field Values
      • UI_NOT_SUPPORTED

        public static final int UI_NOT_SUPPORTED
        User interface not supported
        See Also:
        Constant Field Values
      • IMPL_TYPE_MISMATCH

        public static final int IMPL_TYPE_MISMATCH
        impl type for service does not match type required by service
        See Also:
        Constant Field Values
      • ILLEGAL_SERVICES_STATE

        public static final int ILLEGAL_SERVICES_STATE
        Services state does not support the current operation
        See Also:
        Constant Field Values
      • MISSING_RES_ID

        public static final int MISSING_RES_ID
        wizard.inf does not contain entry RES_ID
        See Also:
        Constant Field Values
      • SERVICE_ERROR

        public static final int SERVICE_ERROR
        General service error
        See Also:
        Constant Field Values
      • REMOTE_SERVICE_EXCEPTION

        public static final int REMOTE_SERVICE_EXCEPTION
        General remote service error
        See Also:
        Constant Field Values
      • REMOTE_INVOCATION_FAILED

        public static final int REMOTE_INVOCATION_FAILED
        Remote service operation failed
        See Also:
        Constant Field Values
      • REMOTE_IO_EXCEPTION

        public static final int REMOTE_IO_EXCEPTION
        Remote service could not be utilized due to IO error
        See Also:
        Constant Field Values
    • Constructor Detail

      • ServiceException

        public ServiceException​(int code)
        Creates the ServiceException with the error code specified.
        Parameters:
        code - Error code
      • ServiceException

        public ServiceException​(int code,
                                java.lang.String msg)
        Creates the ServiceException with the specified error code and a message
      • ServiceException

        public ServiceException​(int code,
                                java.lang.String msg,
                                java.lang.Object data)
        Creates the exception object with specified error code, message and underlying exception object
      • ServiceException

        public ServiceException​(java.lang.Throwable e)
    • Method Detail

      • getErrorMsg

        public static java.lang.String getErrorMsg​(int code)
        Gives the brief description of the error codes
        Parameters:
        int - error code for which the description is needed.
        Returns:
        String Brief description of the error.
      • getErrorCode

        public int getErrorCode()
        Returns the error code associated with the exception
        Returns:
        int Error code
      • getMessage

        public java.lang.String getMessage()
        Returns the user message if any specified.
        Overrides:
        getMessage in class java.lang.Throwable
      • getData

        public java.lang.Object getData()
        Returns additional information if any specified like underlying Exception Object.
      • setSeverity

        public void setSeverity​(int severity)
        Set the severity of the Exception.
        Parameters:
        int - severity possible values are ServiceException.WARNING, ServiceException.ERROR, ServiceExcepton.FATAL_ERROR
      • getSeverity

        public int getSeverity()
        Returns the severity of the Exception.
        Parameters:
        int - severity It could be one of following ServiceException.WARNING ServiceException.ERROR ServiceExcepton.FATAL_ERROR
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable