Example usage for org.springframework.web.client HttpServerErrorException getLocalizedMessage

List of usage examples for org.springframework.web.client HttpServerErrorException getLocalizedMessage

Introduction

In this page you can find the example usage for org.springframework.web.client HttpServerErrorException getLocalizedMessage.

Prototype

public String getLocalizedMessage() 

Source Link

Document

Creates a localized description of this throwable.

Usage

From source file:com.wavemaker.tools.deployment.cloudfoundry.CloudFoundryDeploymentTarget.java

private void uploadAppliation(CloudFoundryClient client, String appName, ApplicationArchive applicationArchive)
        throws DeploymentStatusException {
    Timer timer = new Timer();
    try {/*from  w w  w.j  av a2s .c  o  m*/
        client.uploadApplication(appName, applicationArchive, new LoggingStatusCallback(timer));
        log.info("Application upload completed in " + timer.stop() + "ms");
    } catch (HttpServerErrorException e) {
        throw new DeploymentStatusException("ERROR in upload application: " + e.getLocalizedMessage(), e);
    } catch (IOException ex) {
        throw new WMRuntimeException("Error ocurred while trying to upload WAR file.", ex);
    }
}