Class BadRequestException
Represents an HTTP 400 error.
- Exception implements Throwable
-
RuntimeException
-
Cake\Core\Exception\Exception
-
Cake\Network\Exception\HttpException
-
Cake\Network\Exception\BadRequestException
Inherited Properties
-
_attributes
,_messageTemplate
,_responseHeaders
code
,file
,line
,message
Method Summary
-
__construct() public
Constructor
Method Detail
__construct() public ¶
__construct( string $message null , integer $code 400 )
Constructor
Parameters
- string $message optional null
- If no message is given 'Bad Request' will be the message
- integer $code optional 400
- Status code, defaults to 400
Overrides
Methods inherited from Cake\Core\Exception\Exception
responseHeader() public ¶
responseHeader( string|array|null $header null , string $value null )
Get/set the response header to be used
See also Cake\Network\Response::header()
Parameters
- string|array|null $header optional null
An array of header strings or a single header string - an associative array of "header name" => "header value" - an array of string headers is also accepted
- string $value optional null
- The header value.
Returns
array