<?php
namespace AppBundle;
/**
* Our exceptions may be serialized for passing state to a worker via SQS, but that
* can cause issues if anything unserializable is in the exception's stack trace
*
* @see http://fabien.potencier.org/php-serialization-stack-traces-and-exceptions.html
*/
class ZaneException extends \Exception implements \Serializable
{
public function serialize()
{
return serialize(array($this->message, $this->code, $this->file, $this->line));
}
public function unserialize($serialized)
{
list($this->message, $this->code, $this->file, $this->line) = unserialize($serialized);
}
}