AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Statics
    • Test
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Exceptions

  • AbstractException
  • ControllerException
  • CronException
  • ExtensionException
  • FileException
  • FileSystemException
  • OSException
  • ProfilerException
  • SFTPException
  • TesterException
 1 <?php
 2 
 3    namespace Alo\Exception;
 4 
 5    if (!defined('GEN_START')) {
 6       http_response_code(404);
 7       die();
 8    }
 9 
10    /**
11     * Abstract framework exception
12     *
13     * @author Art <a.molcanovas@gmail.com>
14     */
15    abstract class AbstractException extends \Exception {
16 
17       /**
18        * Creates the exception
19        *
20        * @author Art <a.molcanovas@gmail.com>
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    }
AloFramework documentation API documentation generated by ApiGen 2.8.0