public function renderString($templateString)
    {
        try {
            return $this->twigStringEnvironment->render($templateString, $this->getData());
        } catch (SecurityException $e) {
            throw new SecurityException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Runtime $e) {
            throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Syntax $e) {
            throw new InvalidSyntaxException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Loader $e) {

            if ($this->ignoreUndefinedTemplateErrors && Str::contains($e->getMessage(), 'is not defined'))
            {
                return;
            }

            throw new InvalidTemplateException($e->getMessage(), $e->getCode(), $e);
        }
    }