WorkerNameTooLongException.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Gearman Bundle for Symfony2
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. *
  8. * Feel free to edit as you please, and have fun.
  9. *
  10. * @author Marc Morera <yuhu@mmoreram.com>
  11. */
  12. namespace Mmoreram\GearmanBundle\Exceptions;
  13. use Exception;
  14. use Mmoreram\GearmanBundle\Exceptions\Abstracts\AbstractGearmanException;
  15. /**
  16. * GearmanBundle can't find worker specified as Gearman format Exception
  17. *
  18. * @since 2.3.3
  19. */
  20. class WorkerNameTooLongException extends AbstractGearmanException
  21. {
  22. /**
  23. * Construction method
  24. *
  25. * @param string $message Message
  26. * @param int $code Code
  27. * @param Exception $previous Previous
  28. */
  29. public function __construct($message = null, $code = 0, Exception $previous = null)
  30. {
  31. $message = 'The function name + unique id cannot exceed 114 bytes.
  32. You can change workers name or set a shortly unique key';
  33. parent::__construct($message, $code, $previous);
  34. }
  35. }