Class RestException

  • All Implemented Interfaces:
    java.io.Serializable

    public class RestException
    extends javax.ws.rs.WebApplicationException
    Exception to represent an error of Rest Request Process.
    Since:
    6.1.0
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Method Summary

      • Methods inherited from class javax.ws.rs.WebApplicationException

        getResponse
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

      • RestException

        public RestException​(int code,
                             java.lang.String message,
                             java.lang.Exception exception,
                             IDouiRestInterfaceRequest.ResponseType responseType)
        Treats the exceptions thats occurs during the rest request process. This method builds a response error and logs the error that is passed as parameter.
        Parameters:
        code - HTTP status code, e.g., 403, 404, 500, etc.
        message - the message that will be send to client.
        e - exception to be logged.
        Since:
        6.1.0
      • RestException

        public RestException​(int code,
                             java.lang.String message,
                             IDouiRestInterfaceRequest.ResponseType responseType)
        Treats the exceptions that occurs during the rest request process. This method builds a response error.
        Parameters:
        code - HTTP status code, e.g., 403, 404, 500, etc.
        message - the message that will be send to client.
        Since:
        6.1.0