getMessage(); } parent::__construct($message, $code, $previous); } /** * @return LtiErrorMessage */ public function getLtiMessage() { if ($this->ltiMessage === null) { $message = __('Error (%s): ', $this->getCode()) . $this->getMessage(); $log = __('Error(%s): [key %s] %s "%s"', $this->getCode(), $this->getKey(), get_class($this), $this->getMessage()); $this->ltiMessage = new LtiErrorMessage($message, $log); } return $this->ltiMessage; } public function setLaunchData(LtiLaunchData $data) { $this->launchData = $data; } public function getLaunchData() { return $this->launchData; } /** * @return string */ public function getKey() { if (!isset($this->key)) { $this->key = uniqid(); } return $this->key; } /** * @return string */ public function __toString() { return '[key ' . $this->getKey() . '] ' . parent::__toString(); } }