1 <?php
2
3 namespace Alo\Exception;
4
5 if (!defined('GEN_START')) {
6 http_response_code(404);
7 } else {
8
9 /**
10 * Abstract framework exception
11 *
12 * @author Art <a.molcanovas@gmail.com>
13 */
14 abstract class AbstractException extends \Exception {
15
16 /**
17 * Creates the exception
18 *
19 * @author Art <a.molcanovas@gmail.com>
20 *
21 * @param string $message Exception message
22 * @param int $code Exception code
23 * @param \Exception $previous Previous exception, if chaining
24 */
25 function __construct($message = '', $code = 0, $previous = null) {
26 parent::__construct($message, $code, $previous);
27
28 \Log::error($message . ' (trace: ' . $this->getTraceAsString() . ')');
29 }
30
31 }
32 }
33