6
0
Fork 0

添加异常日志记录

release
vine_liutk 2021-12-03 14:27:32 +08:00
parent 402b2536bc
commit 0da85f543a
10 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class ReleaseCancel extends RowAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -50,6 +50,7 @@ class ReleaseDown extends RowAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -50,6 +50,7 @@ class ReleaseUp extends RowAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -50,6 +50,7 @@ class SkuSyncSpu extends RowAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -56,6 +56,7 @@ class BatchReleaseCancel extends BatchAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -57,6 +57,7 @@ class BatchReleaseDown extends BatchAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -58,6 +58,7 @@ class BatchReleaseUp extends BatchAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败,'.$th->getMessage())->refresh(); return $this->response()->error('操作失败,'.$th->getMessage())->refresh();
} }

View File

@ -63,6 +63,7 @@ class BatchSkuSyncSpu extends BatchAction
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
} }
$message = '操作成功'; $message = '操作成功';

View File

@ -29,6 +29,7 @@ class SkuVerify extends Form implements LazyRenderable
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败:'.$th->getMessage()); return $this->response()->error('操作失败:'.$th->getMessage());
} }

View File

@ -31,6 +31,7 @@ class SkuVerifyBatch extends Form implements LazyRenderable
DB::commit(); DB::commit();
} catch (Throwable $th) { } catch (Throwable $th) {
DB::rollBack(); DB::rollBack();
report($th);
return $this->response()->error('操作失败:'.$th->getMessage()); return $this->response()->error('操作失败:'.$th->getMessage());
} }