org.cloudfoundry.client.lib
Class CloudFoundryException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.web.client.RestClientException
                      extended by org.springframework.web.client.HttpStatusCodeException
                          extended by org.springframework.web.client.HttpClientErrorException
                              extended by org.cloudfoundry.client.lib.CloudFoundryException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NotFinishedStagingException, StagingErrorException

public class CloudFoundryException
extends org.springframework.web.client.HttpClientErrorException

See Also:
Serialized Form

Constructor Summary
CloudFoundryException(org.springframework.http.HttpStatus statusCode)
           
CloudFoundryException(org.springframework.http.HttpStatus statusCode, String statusText)
           
CloudFoundryException(org.springframework.http.HttpStatus statusCode, String statusText, int cloudFoundryErrorCode)
           
CloudFoundryException(org.springframework.http.HttpStatus statusCode, String statusText, String description)
          Construct a new instance of CloudFoundryException based on a HttpStatus, status text and description.
 
Method Summary
 int getCloudFoundryErrorCode()
          Returns an additional error code that is specific to failures in Cloud Foundry requests or behaviour.
 String getDescription()
           
 void setDescription(String description)
           
 String toString()
           
 
Methods inherited from class org.springframework.web.client.HttpStatusCodeException
getResponseBodyAsByteArray, getResponseBodyAsString, getResponseHeaders, getStatusCode, getStatusText
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CloudFoundryException

public CloudFoundryException(org.springframework.http.HttpStatus statusCode)

CloudFoundryException

public CloudFoundryException(org.springframework.http.HttpStatus statusCode,
                             String statusText)

CloudFoundryException

public CloudFoundryException(org.springframework.http.HttpStatus statusCode,
                             String statusText,
                             int cloudFoundryErrorCode)

CloudFoundryException

public CloudFoundryException(org.springframework.http.HttpStatus statusCode,
                             String statusText,
                             String description)
Construct a new instance of CloudFoundryException based on a HttpStatus, status text and description.

Parameters:
statusCode - the status code
statusText - the status text
description - the description
Method Detail

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getCloudFoundryErrorCode

public int getCloudFoundryErrorCode()
Returns an additional error code that is specific to failures in Cloud Foundry requests or behaviour.

Returns:
Cloud Foundry error code, if available, or -1 if unknown.

toString

public String toString()
Overrides:
toString in class Throwable


Copyright © 2013. All rights reserved.