diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 2d8f72d..cba0f27 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -43,7 +43,13 @@ class HomeController extends Controller continue; foreach ($filegroup as $file) { - $pkt = new Packet($file); + try { + $pkt = new Packet($file); + + } catch (\Exception $e) { + return redirect()->back()->withErrors($e->getMessage()); + } + break; } } diff --git a/resources/views/pkt/debug.blade.php b/resources/views/pkt/debug.blade.php index 1b85ea9..00f8016 100644 --- a/resources/views/pkt/debug.blade.php +++ b/resources/views/pkt/debug.blade.php @@ -26,6 +26,19 @@ + @if($errors->count()) +