Skip to content

Commit

Permalink
[5.4] Improve Queue's InvalidPayloadException error message (#20143)
Browse files Browse the repository at this point in the history
* add exception message

* Update Queue.php
  • Loading branch information
timacdonald authored and taylorotwell committed Jul 19, 2017
1 parent 6e72548 commit 7107e57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Queue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ protected function createPayload($job, $data = '', $queue = null)
$payload = json_encode($this->createPayloadArray($job, $data, $queue));

if (JSON_ERROR_NONE !== json_last_error()) {
throw new InvalidPayloadException;
throw new InvalidPayloadException(
'Unable to JSON encode payload. Error code: '.json_last_error()
);
}

return $payload;
Expand Down

0 comments on commit 7107e57

Please sign in to comment.