NoCallableGearmanMethodException.php 811 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 calling method
  12. */
  13. class NoCallableGearmanMethodException extends Exception
  14. {
  15. /**
  16. * Construct method for Exception
  17. *
  18. * @param string $calledMethod Called and not found method
  19. * @param integer $code Code of exception
  20. * @param Exception $previous Previos Exception
  21. */
  22. public function __construct($calledMethod='', $code = 0, Exception $previous = null)
  23. {
  24. $message = 'GearmanBundle can\'t find "'.$calledMethod.'" method. Call "php app/console gearman:methods:list' . PHP_EOL;
  25. parent::__construct($message, $code, $previous);
  26. }
  27. }