Application Server 3.5

Class AgoHTTPStatusException

All Implemented Interfaces:
AgiParentedException, Serializable

public class AgoHTTPStatusException
extends AgoException

An exception corresponding to an unsuccessful HTTP status. See the HTTP specification at for a list of status codes.

In general status codes are three decimal digits. The high order digit specifies the class of the status code as follows:
Value Meaning
100 Informational
200 Successful
300 Redirection
400 Client Error
500 Server Error

Note that an AgoHTTPStatusException should never be generated for a status code in the 200-299 range since that indicates success.

See Also:
Serialized Form

Constructor Summary
AgoHTTPStatusException(int status, URL url)
Method Summary
 int getStatus()
          Returns the HTTP status code of this exception.
Methods inherited from class com.sssw.rt.util.AgoException
copyTo, getExceptionHTML, getExceptionMessage, getExceptionMessage, getHTML, getMessage, getMessage, getParentException, printStackTrace, printStackTrace, printStackTrace, setHTML
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods implemented from interface com.sssw.rt.util.AgiParentedException

Constructor Detail


public AgoHTTPStatusException(int status,
                              URL url)
status - the HTTP status code
url - the content-body returned in the HTTP response
Method Detail


public int getStatus()
Returns the HTTP status code of this exception. This code should not be in the range 200 to 299, since these are success codes.
 try {
     // some remote operation
 catch (AgoHTTPStatusException x) {
     System.out.println("Status code returned was " +x.getStatus());

Application Server 3.5