Version 1
[yaffs-website] / web / modules / contrib / redirect / src / Exception / RedirectLoopException.php
1 <?php
2
3 namespace Drupal\redirect\Exception;
4
5 use Drupal\Component\Utility\SafeMarkup;
6
7 /**
8  * Exception for when a redirect loop is detected.
9  */
10 class RedirectLoopException extends \RuntimeException {
11
12   /**
13    * Formats a redirect loop exception message.
14    *
15    * @param string $path
16    *   The path that results in a redirect loop.
17    * @param int $rid
18    *   The redirect ID that is involved in a loop.
19    */
20   public function __construct($path, $rid) {
21     parent::__construct(SafeMarkup::format('Redirect loop identified at %path for redirect %rid', ['%path' => $path, '%rid' => $rid]));
22   }
23
24 }