<?php
namespace common\components;
use Yii;

class AjaxException extends Exception
{

    public function __construct($message = '', $code = 1)
    {
        Yii::error('code:' . $code . ',message:' . $message);
        parent::__construct($code, $message);
    }

    public static function getInstance($code = 1, $message = '')
    {
        return new AjaxException($code, $message);
    }

}
