WorkerDoesNotExistException.php 781 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Gearman Bundle for Symfony2
  4. *
  5. * @author Marc Morera <yuhu@mmoreram.com>
  6. * @since 2013
  7. */
  8. namespace Mmoreram\GearmanBundle\Exceptions;
  9. use Exception;
  10. /**
  11. * GearmanBundle can't find worker specified as Gearman format Exception
  12. */
  13. class WorkerDoesNotExistException extends Exception
  14. {
  15. /**
  16. * Construct method for Exception
  17. *
  18. * @param string $worker Worker name to be shown in Exception
  19. * @param integer $code Code of exception
  20. * @param Exception $previous Previos Exception
  21. */
  22. public function __construct($worker, $code = 0, Exception $previous = null)
  23. {
  24. $message = 'GearmanBundle can\'t find worker with name ' . $worker . PHP_EOL;
  25. parent::__construct($message, $code, $previous);
  26. }
  27. }