private function OAuthKeyForm::onException in Lightning API 8.3
Same name and namespace in other branches
- 8.4 src/Form/OAuthKeyForm.php \Drupal\lightning_api\Form\OAuthKeyForm::onException()
- 8 src/Form/OAuthKeyForm.php \Drupal\lightning_api\Form\OAuthKeyForm::onException()
- 8.2 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 74
Class
- OAuthKeyForm
- Provides a form for generating OAuth key pairs in the UI.
Namespace
Drupal\lightning_api\FormCode
private function onException(\Exception $e, FormStateInterface $form_state) {
$this
->messenger()
->addError($e
->getMessage());
$form_state
->setRebuild();
}