Explorar el Código

updated UI::layout exception types

Piotr Labudda hace 8 años
padre
commit
8f39f2882c
Se han modificado 1 ficheros con 9 adiciones y 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());