= 0) { parent::__construct($message, $code, $previous); } else { parent::__construct($message, $code); } if (is_array($retryMap)) { $this->retryMap = $retryMap; } } /** * Gets the number of times the associated task can be retried. * * NOTE: -1 is returned if the task can be retried indefinitely * * @return integer */ public function allowedRetries() { if (isset($this->retryMap[$this->code])) { return $this->retryMap[$this->code]; } return 0; } }