From a20fa97445be786f9f5f09e2e9b905a00064b2da Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 8 Nov 2016 08:27:05 -0600 Subject: [PATCH] add files --- src/Illuminate/Queue/InteractsWithQueue.php | 6 +++--- src/Illuminate/Queue/ManuallyFailedException.php | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/Illuminate/Queue/ManuallyFailedException.php diff --git a/src/Illuminate/Queue/InteractsWithQueue.php b/src/Illuminate/Queue/InteractsWithQueue.php index 0ea699a2923a..bddd216f36ba 100644 --- a/src/Illuminate/Queue/InteractsWithQueue.php +++ b/src/Illuminate/Queue/InteractsWithQueue.php @@ -38,13 +38,13 @@ public function delete() /** * Fail the job from the queue. * - * @param \Throwable $e + * @param \Throwable $exception * @return void */ - public function fail($e) + public function fail($exception = null) { if ($this->job) { - return $this->job->failed($e); + return $this->job->failed($exception ?: new ManuallyFailedException); } } diff --git a/src/Illuminate/Queue/ManuallyFailedException.php b/src/Illuminate/Queue/ManuallyFailedException.php new file mode 100644 index 000000000000..30ac0ad3bc80 --- /dev/null +++ b/src/Illuminate/Queue/ManuallyFailedException.php @@ -0,0 +1,9 @@ +