blob: b1ec9611778f1681fc84537bba55c5854a8ffaf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
/*
* Licensed under AGPLv3
* (see COPYING for full license text)
*
*/
namespace exceptions;
class ApiException extends \Exception {
private $error_id;
private $data;
public function __construct($error_id, $message, $data = null, $previous = null)
{
parent::__construct($message, 0, $previous);
$this->error_id = $error_id;
$this->data = $data;
}
public function get_error_id()
{
return $this->error_id;
}
public function get_data()
{
return $this->data;
}
public function get_http_error_code()
{
return 500;
}
}
|