Author: germuska
Date: Sun Feb 13 11:22:39 2005
New Revision: 153657
URL: http://svn.apache.org/viewcvs?view=rev&rev=153657
Log:
Add 'exception' property to ActionContext and ActionContextBase.
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java?view=diff&r1=153656&r2=153657
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
Sun Feb 13 11:22:39 2005
@@ -215,6 +215,18 @@
*/
void setFormValid(Boolean valid);
+ /**
+ * Retrieve an exception which may have been caught by some code using
this ActionContext.
+ * @return
+ */
+ Exception getException();
+
+ /**
+ * Store an exception in this context for use by other handling code.
+ * @param e
+ */
+ void setException(Exception e);
+
// -------------------------------
// ActionMessage Processing
// -------------------------------
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java?view=diff&r1=153656&r2=153657
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
Sun Feb 13 11:22:39 2005
@@ -58,6 +58,8 @@
public static final String MODULE_CONFIG_KEY = Constants.MODULE_CONFIG_KEY;
+ public static final String EXCEPTION_KEY = Constants.EXCEPTION_KEY;
+
public static final String DEFAULT_DATA_SOURCE_KEY = "dataSource";
public static final String ERROR_ACTION_MESSAGES_KEY = "errors";
@@ -163,6 +165,14 @@
this.put(MODULE_CONFIG_KEY, config);
}
+ public Exception getException() {
+ return (Exception) this.get(EXCEPTION_KEY);
+ }
+
+ public void setException(Exception e) {
+ this.put(EXCEPTION_KEY, e);
+ }
+
// -------------------------------
// ActionMessage Processing
// -------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]