<commit_before><html>
<head>
    <sec:ifLoggedIn>
        <meta name="layout" content="main" />
    </sec:ifLoggedIn>

    <sec:ifNotLoggedIn>
        <meta name="layout" content="public" />
    </sec:ifNotLoggedIn>

    <title><g:message code="exception.page.title"/></title>
</head>

<body>

<g:if test="${exception}">
    <div class="msg-box error wide">
        <img src="${resource(dir:'images', file:'icon14.gif')}" alt="${message(code:'error.icon.alt',default:'Error')}"/>
        <strong><g:message code="flash.exception.message.title"/></strong>
        <p>
            <g:message code="flash.exception.message"/>
        </p>
    </div>


    <div class="form-edit">
        <div class="heading">
            <strong><g:message code="exception.code.title" args="[request.'javax.servlet.error.status_code']"/></strong>
        </div>

        <div class="form-hold">
            <div class="form-columns">

                <!-- error details -->
                <table cellpadding="0" cellspacing="0" class="dataTable">
                    <tr>
                        <td><g:message code="exception.uri"/></td>
                        <td class="value">${request['javax.servlet.error.request_uri']}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.message"/></td>
                        <td class="value">${exception.message?.encodeAsHTML()}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.cause"/></td>
                        <td class="value">${exception.cause?.message?.encodeAsHTML()}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.source"/></td>
                        <td class="value">
                            <g:message code="exception.message" args="[exception.className, exception.lineNumber]"/>
                        </td>
                    </tr>
                </table>

                <div class="code">
                    <g:each var="cs" in="${exception.codeSnippet}">
                        ${cs?.encodeAsHTML()}<br />
                    </g:each>
                </div>
            </div>

            <!-- stack trace -->
            <div class="box-cards">
                <div class="box-cards-title">
                    <a class="btn-open"><span><g:message code="exception.stack.trace.title"/></span></a>
                </div>
                <div class="box-card-hold">
                    <div class="form-columns">

                        <div class="code stacktrace">
                            <pre><g:each in="${exception.stackTraceLines}">${it.encodeAsHTML()}</g:each></pre>
                        </div>

                    </div>
                </div>
            </div>

            <!-- spacer -->
            <div>
                <br/>&nbsp;
            </div>
        </div>
    </div>
</g:if>


</body>
</html><commit_msg>Error page - hide exception "code snippet" if not set<commit_after><html>
<head>
    <sec:ifLoggedIn>
        <meta name="layout" content="main" />
    </sec:ifLoggedIn>

    <sec:ifNotLoggedIn>
        <meta name="layout" content="public" />
    </sec:ifNotLoggedIn>

    <title><g:message code="exception.page.title"/></title>
</head>

<body>

<g:if test="${exception}">
    <div class="msg-box error wide">
        <img src="${resource(dir:'images', file:'icon14.gif')}" alt="${message(code:'error.icon.alt',default:'Error')}"/>
        <strong><g:message code="flash.exception.message.title"/></strong>
        <p>
            <g:message code="flash.exception.message"/>
        </p>
    </div>


    <div class="form-edit">
        <div class="heading">
            <strong><g:message code="exception.code.title" args="[request.'javax.servlet.error.status_code']"/></strong>
        </div>

        <div class="form-hold">
            <div class="form-columns">

                <!-- error details -->
                <table cellpadding="0" cellspacing="0" class="dataTable">
                    <tr>
                        <td><g:message code="exception.uri"/></td>
                        <td class="value">${request['javax.servlet.error.request_uri']}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.message"/></td>
                        <td class="value">${exception.message?.encodeAsHTML()}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.cause"/></td>
                        <td class="value">${exception.cause?.message?.encodeAsHTML()}</td>
                    </tr>

                    <tr>
                        <td><g:message code="exception.source"/></td>
                        <td class="value">
                            <g:message code="exception.message" args="[exception.className, exception.lineNumber]"/>
                        </td>
                    </tr>
                </table>

                <g:if test="${exception.codeSnippet}">
                    <div class="code">
                        <g:each var="cs" in="${exception.codeSnippet}">
                            ${cs?.encodeAsHTML()}<br />
                        </g:each>
                    </div>
                </g:if>
            </div>

            <!-- stack trace -->
            <div class="box-cards">
                <div class="box-cards-title">
                    <a class="btn-open"><span><g:message code="exception.stack.trace.title"/></span></a>
                </div>
                <div class="box-card-hold">
                    <div class="form-columns">

                        <div class="code stacktrace">
                            <pre><g:each in="${exception.stackTraceLines}">${it.encodeAsHTML()}</g:each></pre>
                        </div>

                    </div>
                </div>
            </div>

            <!-- spacer -->
            <div>
                <br/>&nbsp;
            </div>
        </div>
    </div>
</g:if>


</body>
</html>
{'fraction_non_alphanumeric': 0.17772317772317772, 'fraction_numerical': 0.0013104013104013104, 'mean_word_length': 1.352080123266564, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4980402', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1625, 'n_words': 254}