Version: current

# Class SS_HTTPResponse_Exception

A `SS_HTTPResponse` encapsulated in an exception, which can interrupt the processing flow and be caught by the `RequestHandler` and returned to the user.

Example Usage:

    throw new SS_HTTPResponse_Exception('This request was invalid.', 400);
    throw new SS_HTTPResponse_Exception(new SS_HTTPResponse('There was an internal server error.', 500));

  Exception
  SS_HTTPResponse_Exception

Package: sapphire\control
Used by: ``RequestHandler::httpError()``
Located at sapphire/core/control/HTTPResponse.php

## Methods summary

`public` | # `__construct( mixed $body = null, mixed $statusCode = null, mixed $statusDescription = null )` #### See SS_HTTPResponse::__construct(); #### Overrides `Exception::__construct`
`public `SS_HTTPResponse`` | # `getResponse( )` #### Returns ``SS_HTTPResponse`` SS_HTTPResponse
`public` | # `setResponse( `SS_HTTPResponse` $response )` #### Parameters $response SS_HTTPResponse $response

### Methods inherited from Exception

`__toString()`, `__wakeup()`, `getCode()`, `getFile()`, `getLine()`, `getMessage()`, `getPrevious()`, `getTrace()`, `getTraceAsString()`

### Magic methods summary

## Properties summary

`protected mixed` | $response | #

### Properties inherited from Exception

`$code`, `$file`, `$line`, `$message`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -