(NFC) Upgrade Civi Folder to the new coder version
[civicrm-core.git] / Civi / API / Exception / UnauthorizedException.php
1 <?php
2 namespace Civi\API\Exception;
3
4 require_once 'api/Exception.php';
5
6 /**
7 * Class UnauthorizedException
8 * @package Civi\API\Exception
9 */
10 class UnauthorizedException extends \API_Exception {
11
12 /**
13 * @param string $message
14 * The human friendly error message.
15 * @param array $extraParams
16 * Extra params to return. eg an extra array of ids. It is not mandatory,
17 * but can help the computer using the api. Keep in mind the api consumer
18 * isn't to be trusted. eg. the database password is NOT a good extra data.
19 * @param \Exception|NULL $previous
20 * A previous exception which caused this new exception.
21 */
22 public function __construct($message, $extraParams = [], \Exception $previous = NULL) {
23 parent::__construct($message, \API_Exception::UNAUTHORIZED, $extraParams, $previous);
24 }
25
26 }