(不推荐使用)直接输出自定义的错误号、错误内容
public static void Asf_Ensure::out(string $data, int $errno)
自定义的错误内容
自定义的错误号
根据 asf.ctype_id 配置项定义输出不同数据格式
<?php
use Asf\Ensure;
ini_set('asf.ctype_id', 5); // default
Ensure::out('xxx', 110); // {"errno":110,"data":"xxx"}
<?php
use Asf\Ensure;
ini_set('asf.ctype_id', 1);
Ensure::out('xxx', 110); // {"errno":110,"errmsg":"xxx","data":""}