Package com.emc.storageos.model.errorhandling

Examples of com.emc.storageos.model.errorhandling.ServiceErrorRestRep


    private final ServiceErrorRestRep serviceError;

    public ServiceErrorException(int httpStatus, ServiceErrorRestRep serviceError) {
        super(httpStatus);
        if (serviceError == null) {
            this.serviceError = new ServiceErrorRestRep();
        }
        else {
            this.serviceError = serviceError;
        }
    }
View Full Code Here


    public ClientResponse handle(ClientRequest request) throws ClientHandlerException {
        ClientResponse response = getNext().handle(request);
        int status = response.getStatus();
        if (status >= 400 && status < 600) {
            if (isSupportedType(response.getType())) {
                ServiceErrorRestRep serviceError;
                try {
                    serviceError = response.getEntity(ServiceErrorRestRep.class);
                }
                catch (Exception e) {
                    // Cause to fall-through to default exception
View Full Code Here

            throw new ServiceErrorsException(errors);
        }
    }

    private static ServiceErrorRestRep taskToError(TaskResourceRep task) {
        ServiceErrorRestRep serviceError = task.getServiceError();
        if (task.getState() == null) {
            serviceError = new ServiceErrorRestRep();
            serviceError.setCodeDescription("Task state is null. Unable to determine success of task");
            serviceError.setDetailedMessage("");
        }
        else if (serviceError == null) {
            serviceError = new ServiceErrorRestRep();
            serviceError.setCodeDescription(task.getMessage() == null ? "No Message" : task.getMessage());
            serviceError.setDetailedMessage("");
        }
        return serviceError;
    }
View Full Code Here

TOP

Related Classes of com.emc.storageos.model.errorhandling.ServiceErrorRestRep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.