From 278be52f7b8bdbf5c23927dcb25890fe6c557699 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Mon, 27 Jun 2016 23:54:45 -0400 Subject: [PATCH] Show the exception message if APP_DEBUG is enabled. --- app/Http/Controllers/AssetsController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 9f1396120e..8cab0d8475 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -840,6 +840,9 @@ class AssetsController extends Controller $file->move($path, $date.'-'.$fixed_filename); } catch (\Symfony\Component\HttpFoundation\File\Exception\FileException $exception) { $results['error']=trans('admin/hardware/message.upload.error'); + if( config('app.debug')) { + $results['error'].= ' ' . $exception->getMessage(); + } return $results; } $name = date('Y-m-d-his').'-'.$fixed_filename;