Skip to content

Commit

Permalink
refactor: 导出失败上报异常
Browse files Browse the repository at this point in the history
  • Loading branch information
slowlyo committed Jul 22, 2024
1 parent c991c25 commit 335feb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Traits/ExportTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ protected function export()
try {
fastexcel($query->get())->export(storage_path('app/' . $path), fn($row) => $this->exportMap($row));
} catch (\Throwable $e) {
report($e);

admin_abort(admin_trans('admin.action_failed'));
}

Expand Down

0 comments on commit 335feb0

Please sign in to comment.