Skip to content
Snippets Groups Projects
Commit a924e234 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2371229 by rpayanm, joshi.rohit100: Exceptions when adding and deleting...

Issue #2371229 by rpayanm, joshi.rohit100: Exceptions when adding and deleting shortcut are regular messages, should be error messages
parent 057bab19
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -50,7 +50,7 @@ public function deleteShortcutLinkInline(ShortcutInterface $shortcut) { ...@@ -50,7 +50,7 @@ public function deleteShortcutLinkInline(ShortcutInterface $shortcut) {
drupal_set_message($this->t('The shortcut %title has been deleted.', array('%title' => $label))); drupal_set_message($this->t('The shortcut %title has been deleted.', array('%title' => $label)));
} }
catch (\Exception $e) { catch (\Exception $e) {
drupal_set_message($this->t('Unable to delete the shortcut for %title.', array('%title' => $label))); drupal_set_message($this->t('Unable to delete the shortcut for %title.', array('%title' => $label)), 'error');
} }
return $this->redirect('<front>'); return $this->redirect('<front>');
......
...@@ -72,7 +72,7 @@ public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Reques ...@@ -72,7 +72,7 @@ public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Reques
drupal_set_message($this->t('Added a shortcut for %title.', array('%title' => $shortcut->label()))); drupal_set_message($this->t('Added a shortcut for %title.', array('%title' => $shortcut->label())));
} }
catch (\Exception $e) { catch (\Exception $e) {
drupal_set_message($this->t('Unable to add a shortcut for %title.', array('%title' => $shortcut->label()))); drupal_set_message($this->t('Unable to add a shortcut for %title.', array('%title' => $shortcut->label())), 'error');
} }
return $this->redirect('<front>'); return $this->redirect('<front>');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment