Browse Source

updated UI::layout exception types

Piotr Labudda 6 năm trước cách đây
mục cha
commit
8f39f2882c
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  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());