Commit 1b3c40b4 by zhufx

调用path增加

parent fe54d59a
......@@ -14,6 +14,9 @@ class CommonException extends Exception
// 业务错误码
public $errorCode = -1;
//异常调用路径
protected $path;
public function __construct($params = [])
{
if(isset($params['code'])){
......@@ -32,6 +35,10 @@ class CommonException extends Exception
$this->errorCode = $params['errorCode'];
}
if ( isset($params['path']) ) {
$this->path = json_encode($params['path']);
}
parent::__construct($this->message, $this->code);
}
......@@ -39,4 +46,9 @@ class CommonException extends Exception
return $this->errorCode;
}
public function getPath()
{
return $this->path;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment