try{
‘数据库操作’;
Db::commit();
$this->success(“成功”)
}cathe(\Exception $exception){
Db::rollback();
$this->error(“成功”);
}
$this->success();其实也是会抛出异常
解决方法:
将:
catch (\Exception $exception)
改为
catch (\think\Exception\DbException $exception)
try{
‘数据库操作’;
Db::commit();
$this->success(“成功”)
}cathe(\Exception $exception){
Db::rollback();
$this->error(“成功”);
}
$this->success();其实也是会抛出异常
解决方法:
将:
catch (\Exception $exception)
改为
catch (\think\Exception\DbException $exception)
凡尘神域2024-11-04 13:35
发表在:炫酷可装杯的艺术签名商务签名设计,看这里!不错
CqbcImLl2024-11-03 22:38
发表在:微信小程序下载mp4视频失败saveVideoToPhotosAlbum :fail invalid video type!已解决!学习下
sea2024-11-02 12:42
发表在:微信小程序下载mp4视频失败saveVideoToPhotosAlbum :fail invalid video type!已解决!123123