<?php

namespace Heanup\Frame;

/**
 * 主要是在抛出异常的时候记录出错信息
 * Class Exception
 * @package Heanup\Frame
 */
class Exception extends \Exception
{
    protected $filename = 'exception';

    public function __construct($message = '', $code = 0, $previous = null)
    {
        $data = array('message' => $message, 'code' => $code, 'previous' => $previous);
        Logger::info($data, $this->filename);
        parent::__construct($message, $code, $previous);
    }
}