Explorar o código

updated UI::layout exception types

Piotr Labudda %!s(int64=8) %!d(string=hai) anos
pai
achega
8f39f2882c
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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());