Skip to content

Commit d414c1e

Browse files
committed
feat: HTTPException implements HasHttpStatusCodeException
HTTPException may be used for HTTP status code in apps.
1 parent 0581338 commit d414c1e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

system/HTTP/Exceptions/HTTPException.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@
1212
namespace CodeIgniter\HTTP\Exceptions;
1313

1414
use CodeIgniter\Exceptions\FrameworkException;
15+
use CodeIgniter\Exceptions\HasHttpStatusCodeException;
1516

1617
/**
1718
* Things that can go wrong with HTTP
1819
*/
19-
class HTTPException extends FrameworkException
20+
class HTTPException extends FrameworkException implements HasHttpStatusCodeException
2021
{
22+
/**
23+
* the default HTTP Status code
24+
*
25+
* @var int
26+
*/
27+
protected $code = 500;
28+
2129
/**
2230
* For CurlRequest
2331
*

0 commit comments

Comments
 (0)