/** * Construct a new invalid path exception. * * @param PathInterface $path The invalid path. * @param Exception|null $previous The cause, if available. */ public function __construct(PathInterface $path, Exception $previous = null) { $this->path = $path; parent::__construct(sprintf("Invalid path %s. %s", var_export($path->string(), true), $this->reason()), 0, $previous); }