1 <?php
2
3 /* --------------------------------------------------------------
4 HttpApiException.inc.php 2015-04-30 gm
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Class HttpApiException
15 *
16 * This exception class is used for handling exceptions that concern the
17 * API execution. The default exception code is set to 500 (Internal Server
18 * Error) and must explicitly set to any other standard HTTP status code in
19 * order to be contained in the response headers.
20 *
21 * @link http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
22 *
23 * @category System
24 * @package Http
25 * @subpackage Exceptions
26 */
27 class HttpApiV2Exception extends Exception
28 {
29 /**
30 * Constructor with default code argument value set to 500 (Internal server error).
31 *
32 * @param string $message
33 * @param int $code
34 * @param Exception $previous
35 */
36 public function __construct($message = '', $code = 500, Exception $previous = null)
37 {
38 parent::__construct($message, $code, $previous);
39 }
40 }