Переглянути джерело

updated UI::layout exception types

Piotr Labudda 8 роки тому
батько
коміт
8f39f2882c
1 змінених файлів з 9 додано та 0 видалено
  1. 9 0
      SE/se-lib/UI.php

+ 9 - 0
SE/se-lib/UI.php

@@ -819,6 +819,15 @@ class UI {
 		if ($params['showContainer']) UI::startContainer( $params['containerClass'] ? [ 'class' => $params['containerClass'] ] : [] );
 		try {
 			call_user_func($callback);
+		} catch (AlertSuccessException $e) {
+			DBG::log($e);
+			UI::alert('success', $e->getMessage());
+		} catch (AlertWarningException $e) {
+			DBG::log($e);
+			UI::alert('warning', $e->getMessage());
+		} catch (AlertInfoException $e) {
+			DBG::log($e);
+			UI::alert('info', $e->getMessage());
 		} catch (Exception $e) {
 			DBG::log($e);
 			UI::alert('danger', $e->getMessage());