modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2025-10-08 15:48:46 +04:00
parent c37748b6f4
commit 8974cf09a1

View File

@ -14,7 +14,8 @@ class exceptions {
if ($e instanceof UserException) $userMessage = $e->getUserMessage();
elseif ($e instanceof ExceptionShadow) $userMessage = $e->getUserMessage();
else return null;
return c::to_string($userMessage);
if ($userMessage === null) return null;
else return c::to_string($userMessage);
}
/** @param Throwable|ExceptionShadow $e */
@ -22,7 +23,8 @@ class exceptions {
if ($e instanceof UserException) $techMessage = $e->getTechMessage();
elseif ($e instanceof ExceptionShadow) $techMessage = $e->getTechMessage();
else return null;
return c::to_string($techMessage);
if ($techMessage === null) return null;
else return c::to_string($techMessage);
}
/** @param Throwable|ExceptionShadow $e */