Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 8, 2016
1 parent 4c4cd03 commit a20fa97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Queue/InteractsWithQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/Illuminate/Queue/ManuallyFailedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Illuminate\Queue;

use RuntimeException;

class ManuallyFailedException extends RuntimeException
{
}

0 comments on commit a20fa97

Please sign in to comment.