catch exception on judging controller
This commit is contained in:
parent
59629e227d
commit
38d7826218
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Http\Controllers\Judging;
|
namespace App\Http\Controllers\Judging;
|
||||||
|
|
||||||
use App\Actions\Tabulation\EnterScore;
|
use App\Actions\Tabulation\EnterScore;
|
||||||
|
use App\Exceptions\AuditionAdminException;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Audition;
|
use App\Models\Audition;
|
||||||
use App\Models\Entry;
|
use App\Models\Entry;
|
||||||
|
|
@ -100,7 +101,11 @@ class JudgingController extends Controller
|
||||||
|
|
||||||
// Enter the score
|
// Enter the score
|
||||||
/** @noinspection PhpUnhandledExceptionInspection */
|
/** @noinspection PhpUnhandledExceptionInspection */
|
||||||
|
try {
|
||||||
$enterScore(Auth::user(), $entry, $validatedData['score']);
|
$enterScore(Auth::user(), $entry, $validatedData['score']);
|
||||||
|
} catch (AuditionAdminException $e) {
|
||||||
|
return redirect()->back()->with('error', $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Deal with an advancement vote if needed
|
// Deal with an advancement vote if needed
|
||||||
$this->advancementVote($request, $entry);
|
$this->advancementVote($request, $entry);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue