You are here

private function OAuthKeyForm::onException in Lightning API 8.2

Same name and namespace in other branches
  1. 8.4 src/Form/OAuthKeyForm.php \Drupal\lightning_api\Form\OAuthKeyForm::onException()
  2. 8 src/Form/OAuthKeyForm.php \Drupal\lightning_api\Form\OAuthKeyForm::onException()
  3. 8.3 src/Form/OAuthKeyForm.php \Drupal\lightning_api\Form\OAuthKeyForm::onException()

Handles exceptions caught during form submission.

Parameters

\Exception $e: The caught exception.

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

1 call to OAuthKeyForm::onException()
OAuthKeyForm::submitForm in src/Form/OAuthKeyForm.php
Form submission handler.

File

src/Form/OAuthKeyForm.php, line 71

Class

OAuthKeyForm

Namespace

Drupal\lightning_api\Form

Code

private function onException(\Exception $e, FormStateInterface $form_state) {
  drupal_set_message($e
    ->getMessage(), 'error');
  $form_state
    ->setRebuild();
}