yii异常处理架构
使用方法:
use \yii\base\ErrorException;
try {
exec("curl http://xxx",$out,$retno);
if(0 !== $retno){
throw new ErrorException(var_export($out,true),0,1,__FILE__,__LINE__);
} catch (ErrorException $e){
$error = "{$date} - {$e->getMessage()} - FILE:{$e->getFile()} - LINE:{$e->getLine()}\n";
}