. **/ /** * Class that allows changing message of an Exception without recreating it. */ class CExceptionHelper extends Exception { /** * Set exception message. * * @param Exception $exception Exception to be updated. * @param string $message Message to be set. */ public static function setMessage(Exception $exception, $message) { $exception->message = $message; } }