You are here

protected function SettingsForm::demonstrateErrorHandlers in Devel 8

Same name and namespace in other branches
  1. 8.3 src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::demonstrateErrorHandlers()
  2. 8.2 src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::demonstrateErrorHandlers()
  3. 4.x src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::demonstrateErrorHandlers()

Parameters

string $severity:

1 call to SettingsForm::demonstrateErrorHandlers()
SettingsForm::buildForm in src/Form/SettingsForm.php
Form constructor.

File

src/Form/SettingsForm.php, line 174

Class

SettingsForm
Defines a form that configures devel settings.

Namespace

Drupal\devel\Form

Code

protected function demonstrateErrorHandlers($severity) {
  switch ($severity) {
    case 'notice':
      $undefined = $undefined;
      break;
    case 'warning':
      $undefined = $undefined;
      1 / 0;
      break;
    case 'error':
      $undefined = $undefined;
      1 / 0;
      devel_undefined_function();
      break;
  }
}