Add EndResponseException and helper::die()

This commit is contained in:
Yurun
2021-12-21 09:47:31 +08:00
parent 397f0b587c
commit 2ca28f589f
4 changed files with 145 additions and 71 deletions
+11
View File
@@ -248,6 +248,17 @@ class helper extends baseHelper
if(empty($jsonDecode)) return $response;
return $jsonDecode;
}
/**
* 代替 die、exit 函数终止并输出
*
* @param string $content
* @return void
*/
public static function die($content)
{
throw EndResponseException::create($content);
}
}
/**