chengkun
2025-05-22 1a8aea45ebb1582c9f65d9e8dcd520002f83ae12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
 
class GTException extends Exception
{
    var $requestId;
    //重定义构造器使第一个参数 message 变为必须被指定的属性
    public function __construct(){
        $a=func_get_args();
        $i=func_num_args();
        if(method_exists($this,$f='__construct'.$i)){
            call_user_func_array(array($this,$f),$a);
        }
    }
    function __construct1($a1){
        parent::__construct($a1);
    }
 
    function __construct3($a1,$a2,$a3){
        parent::__construct($a2,null, $a3);
        $this->requestId = $a1;
    }
 
    public function getRequestId()
    {
        return $this->requestId;
    }
}