change \Throwable to \Exceptionm, add missing report()s

This commit is contained in:
spencerrlongg
2025-08-20 23:09:59 -05:00
parent b934f43db0
commit 643d44af22
5 changed files with 5 additions and 10 deletions
@@ -173,17 +173,10 @@ class ManufacturersController extends Controller
} catch (ItemStillHasChildren $e) {
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.assoc_users'));
} catch (\Exception $e) {
report($e);
return redirect()->route('manufacturers.index')->with('error', trans('general.something_went_wrong'));
}
// Soft delete the manufacturer if active, permanent delete if is already deleted
// do we really want to do that?...
// commenting it out for now because it's weird...
//if ($manufacturer->deleted_at === null) {
// $manufacturer->delete();
//} else {
// $manufacturer->forceDelete();
//}
return redirect()->route('manufacturers.index')->with('success', trans('admin/manufacturers/message.delete.success'));
}