Skip to content

Commit 5438286

Browse files
authored
Merge pull request #1961 from divine/fix_failed_job_exception
[Fix] Format exception to string in failed jobs
2 parents 6b291d7 + 6121afa commit 5438286

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Jenssegers/Mongodb/Queue/Failed/MongoFailedJobProvider.php

+3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
1212
* @param string $connection
1313
* @param string $queue
1414
* @param string $payload
15+
* @param \Exception $exception
1516
* @return void
1617
*/
1718
public function log($connection, $queue, $payload, $exception)
1819
{
1920
$failed_at = Carbon::now()->getTimestamp();
2021

22+
$exception = (string) $exception;
23+
2124
$this->getTable()->insert(compact('connection', 'queue', 'payload', 'failed_at', 'exception'));
2225
}
2326

0 commit comments

Comments
 (0)