trycatch的重要性

private void checkVersion() {
    try {
        























    } catch (PackageManager.NameNotFoundException e) {
        ToastUtil.hintLoadingDialog();
        e.printStackTrace();
    }

}





public function retrieve()
{
    $result = [];
        try {

            






















        } catch (Exception $e) {
            $result = ["error_code" => 110, 'error_msg' => $e];
            $this->ajaxReturn($result);
        }
        $this->ajaxReturn($result);
    }
}

猜你喜欢

转载自blog.csdn.net/u014132947/article/details/80854240