X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FParamConverter%2FParamNotConvertedException.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FParamConverter%2FParamNotConvertedException.php;h=7ff9dc991bb2bb7a7f6dd8c6011feb9548a43791;hp=d44cfc749052d6e660ffba09d45dd30a49e043b5;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php b/web/core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php index d44cfc749..7ff9dc991 100644 --- a/web/core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php +++ b/web/core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php @@ -7,4 +7,58 @@ namespace Drupal\Core\ParamConverter; */ class ParamNotConvertedException extends \Exception { + /** + * The route name that was not converted. + * + * @var string + */ + protected $routeName = ""; + + /** + * The raw parameters that were not converted. + * + * @var array + */ + protected $rawParameters = []; + + /** + * Constructs the ParamNotConvertedException. + * + * @param string $message + * The Exception message to throw. + * @param int $code + * The Exception code. + * @param \Exception $previous + * The previous exception used for the exception chaining. + * @param string $route_name + * The route name that was not converted. + * @param array $raw_parameters + * The raw parameters that were not converted. + */ + public function __construct($message = "", $code = 0, \Exception $previous = NULL, $route_name = "", array $raw_parameters = []) { + parent::__construct($message, $code, $previous); + $this->routeName = $route_name; + $this->rawParameters = $raw_parameters; + } + + /** + * Get the route name that was not converted. + * + * @return string + * The route name that was not converted. + */ + public function getRouteName() { + return $this->routeName; + } + + /** + * Get the raw parameters that were not converted. + * + * @return array + * The raw parameters that were not converted. + */ + public function getRawParameters() { + return $this->rawParameters; + } + }