You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2021/06/24 11:08:37 UTC

[myfaces-tobago] branch master updated: fix: robustness in exception handliing

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 53e167e  fix: robustness in exception handliing
53e167e is described below

commit 53e167efb327b4c4ab1194e81ba8ae3700ba9360
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Jun 24 13:07:33 2021 +0200

    fix: robustness in exception handliing
---
 .../org/apache/myfaces/tobago/context/TobagoExceptionHandler.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoExceptionHandler.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoExceptionHandler.java
index 3d121d6..d4e38b5 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoExceptionHandler.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoExceptionHandler.java
@@ -143,7 +143,11 @@ public class TobagoExceptionHandler extends ExceptionHandlerWrapper {
             } else {
               final HttpServletResponse response =
                   (HttpServletResponse) facesContext.getExternalContext().getResponse();
-              response.resetBuffer(); // undo rendering, if you can.
+              try {
+                response.resetBuffer(); // undo rendering, if you can.
+              } catch (Exception e) {
+                LOG.info("Can't reset buffer!");
+              }
               final ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
               final ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(facesContext, viewId);
               final UIViewRoot viewRoot = viewHandler.createView(facesContext, viewId);