3 namespace Drupal\Core\Installer\Exception;
5 use Drupal\Core\StringTranslation\StringTranslationTrait;
8 * Base class for exceptions thrown by installer.
10 class InstallerException extends \RuntimeException {
11 use StringTranslationTrait;
14 * The page title to output.
21 * Constructs a new installer exception.
23 * @param string $message
24 * The exception message.
25 * @param string $title
26 * (optional) The page title. Defaults to 'Error'.
28 * (optional) The exception code. Defaults to 0.
29 * @param \Exception $previous
30 * (optional) A previous exception.
32 public function __construct($message, $title = 'Error', $code = 0, \Exception $previous = NULL) {
33 parent::__construct($message, $code, $previous);
34 $this->title = $title;
38 * Returns the exception page title.
42 public function getTitle() {