proposals/gk/log4j2/src/java/org/apache/turbine/Turbine.java [821:863]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void handleException(PipelineData pipelineData, HttpServletResponse res,
                                       Throwable t)
    {
        RunData data = (RunData) pipelineData;
        // make sure that the stack trace makes it the log
        log.error("Turbine.handleException: ", t);

        try
        {
            // This is where we capture all exceptions and show the
            // Error Screen.
            data.setStackTrace(ExceptionUtils.getStackTrace(t), t);

            // setup the screen
            data.setScreen(configuration.getString(
                    TurbineConstants.SCREEN_ERROR_KEY,
                    TurbineConstants.SCREEN_ERROR_DEFAULT));

            // do more screen setup for template execution if needed
            if (data.getTemplateInfo() != null)
            {
                data.getTemplateInfo()
                    .setScreenTemplate(configuration.getString(
                            TurbineConstants.TEMPLATE_ERROR_KEY,
                            TurbineConstants.TEMPLATE_ERROR_VM));
            }

            // Make sure to not execute an action.
            data.setAction("");

            PageLoader.getInstance().exec(pipelineData,
                    configuration.getString(TurbineConstants.PAGE_DEFAULT_KEY,
                            TurbineConstants.PAGE_DEFAULT_DEFAULT));

            data.getResponse().setContentType(data.getContentType());
            data.getResponse().setStatus(data.getStatusCode());
        }
        // Attempt to do *something* at this point...
        catch (Throwable reallyScrewedNow)
        {
            handleHorribleException(res, reallyScrewedNow);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/java/org/apache/turbine/Turbine.java [842:884]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void handleException(PipelineData pipelineData, HttpServletResponse res,
            Throwable t)
    {
        RunData data = (RunData) pipelineData;
        // make sure that the stack trace makes it the log
        log.error("Turbine.handleException: ", t);

        try
        {
            // This is where we capture all exceptions and show the
            // Error Screen.
            data.setStackTrace(ExceptionUtils.getStackTrace(t), t);

            // setup the screen
            data.setScreen(configuration.getString(
                    TurbineConstants.SCREEN_ERROR_KEY,
                    TurbineConstants.SCREEN_ERROR_DEFAULT));

            // do more screen setup for template execution if needed
            if (data.getTemplateInfo() != null)
            {
                data.getTemplateInfo()
                        .setScreenTemplate(configuration.getString(
                                TurbineConstants.TEMPLATE_ERROR_KEY,
                                TurbineConstants.TEMPLATE_ERROR_VM));
            }

            // Make sure to not execute an action.
            data.setAction("");

            PageLoader.getInstance().exec(pipelineData,
                    configuration.getString(TurbineConstants.PAGE_DEFAULT_KEY,
                            TurbineConstants.PAGE_DEFAULT_DEFAULT));

            data.getResponse().setContentType(data.getContentType());
            data.getResponse().setStatus(data.getStatusCode());
        }
        // Attempt to do *something* at this point...
        catch (Throwable reallyScrewedNow)
        {
            handleHorribleException(res, reallyScrewedNow);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



