1: <?php
2: /**
3: * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4: * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5: *
6: * Licensed under The MIT License
7: * Redistributions of files must retain the above copyright notice.
8: *
9: * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
10: * @since 3.0.0
11: * @license https://opensource.org/licenses/mit-license.php MIT License
12: */
13: namespace Cake\Http\Exception;
14:
15: /**
16: * Represents an HTTP 500 error.
17: */
18: class InternalErrorException extends HttpException
19: {
20: /**
21: * Constructor
22: *
23: * @param string|null $message If no message is given 'Internal Server Error' will be the message
24: * @param int $code Status code, defaults to 500
25: * @param \Exception|null $previous The previous exception.
26: */
27: public function __construct($message = null, $code = null, $previous = null)
28: {
29: if (empty($message)) {
30: $message = 'Internal Server Error';
31: }
32: parent::__construct($message, $code, $previous);
33: }
34: }
35: