3 namespace Drupal\Core\ParamConverter;
6 * Provides an exception class for a request parameter that was not converted.
8 class ParamNotConvertedException extends \Exception {
11 * The route name that was not converted.
15 protected $routeName = "";
18 * The raw parameters that were not converted.
22 protected $rawParameters = [];
25 * Constructs the ParamNotConvertedException.
27 * @param string $message
28 * The Exception message to throw.
31 * @param \Exception $previous
32 * The previous exception used for the exception chaining.
33 * @param string $route_name
34 * The route name that was not converted.
35 * @param array $raw_parameters
36 * The raw parameters that were not converted.
38 public function __construct($message = "", $code = 0, \Exception $previous = NULL, $route_name = "", array $raw_parameters = []) {
39 parent::__construct($message, $code, $previous);
40 $this->routeName = $route_name;
41 $this->rawParameters = $raw_parameters;
45 * Get the route name that was not converted.
48 * The route name that was not converted.
50 public function getRouteName() {
51 return $this->routeName;
55 * Get the raw parameters that were not converted.
58 * The raw parameters that were not converted.
60 public function getRawParameters() {
61 return $this->rawParameters;