diff --git a/spring-webflow/changelog.txt b/spring-webflow/changelog.txt index 5394aad6..dd57bd03 100644 --- a/spring-webflow/changelog.txt +++ b/spring-webflow/changelog.txt @@ -46,7 +46,7 @@ Package org.springframework.webflow.engine * Added BeanFactoryFlowVariable(String, BeanFactory, ScopeType) convenience constructor to the BeanFactoryFlowVariable. * Added settableExpression() method to AbstractFlowBuilder. -* Added new exposeException() hook method to TransitionExecutingStateExceptionHandler. +* Added new exposeException() hook method to TransitionExecutingStateExceptionHandler (SWF-280). Package org.springframework.webflow.execution * Added FlowExecutionListener.sessionCreated(RequestContext, FlowSession) callback, useful for diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/support/TransitionExecutingStateExceptionHandler.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/support/TransitionExecutingStateExceptionHandler.java index ba9a23a6..27733e10 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/support/TransitionExecutingStateExceptionHandler.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/support/TransitionExecutingStateExceptionHandler.java @@ -125,13 +125,15 @@ public class TransitionExecutingStateExceptionHandler implements FlowExecutionEx /** * Exposes the given flow exception and root cause in flash scope to make * them available for response rendering. Subclasses can override this - * if they way to expose the exceptions in a different way or do special + * if they want to expose the exceptions in a different way or do special * processing before the exceptions are exposed. * @param context the request control context * @param exception the exception being handled * @param rootCause root cause of the exception being handled (could be null) */ protected void exposeException(RequestContext context, FlowExecutionException exception, Throwable rootCause) { + // note that all Throwables are Serializable so putting them in flash + // scope should not be a problem context.getFlashScope().put(STATE_EXCEPTION_ATTRIBUTE, exception); if (logger.isDebugEnabled()) { logger.debug("Exposing state exception root cause " + rootCause + " under attribute '"