org.apache.struts.util

Class ModuleException

public class ModuleException extends Exception

Used for specialized exception handling.
Field Summary
protected ActionErrorerror
protected ActionMessagemessage
The ActionMessage associated with this exception.
protected Stringproperty
Constructor Summary
ModuleException(String key)
Construct an module exception with no replacement values.
ModuleException(String key, Object value)
Construct an module exception with the specified replacement values.
ModuleException(String key, Object value0, Object value1)
Construct an module exception with the specified replacement values.
ModuleException(String key, Object value0, Object value1, Object value2)
Construct an module exception with the specified replacement values.
ModuleException(String key, Object value0, Object value1, Object value2, Object value3)
Construct an module exception with the specified replacement values.
ModuleException(String key, Object[] values)
Construct an action error with the specified replacement values.
Method Summary
ActionMessagegetActionMessage()
Returns the error associated with the exception.
ActionErrorgetError()
Returns the error associated with the exception.
StringgetProperty()
Returns the property associated with the exception.
voidsetProperty(String property)
Set the property associated with the exception.

Field Detail

error

protected ActionError error

Deprecated: Use message instead.

message

protected ActionMessage message
The ActionMessage associated with this exception.

Since: Struts 1.2

property

protected String property

Constructor Detail

ModuleException

public ModuleException(String key)
Construct an module exception with no replacement values.

Parameters: key Message key for this error message

ModuleException

public ModuleException(String key, Object value)
Construct an module exception with the specified replacement values.

Parameters: key Message key for this error message value First replacement value

ModuleException

public ModuleException(String key, Object value0, Object value1)
Construct an module exception with the specified replacement values.

Parameters: key Message key for this error message value0 First replacement value value1 Second replacement value

ModuleException

public ModuleException(String key, Object value0, Object value1, Object value2)
Construct an module exception with the specified replacement values.

Parameters: key Message key for this error message value0 First replacement value value1 Second replacement value value2 Third replacement value

ModuleException

public ModuleException(String key, Object value0, Object value1, Object value2, Object value3)
Construct an module exception with the specified replacement values.

Parameters: key Message key for this error message value0 First replacement value value1 Second replacement value value2 Third replacement value value3 Fourth replacement value

ModuleException

public ModuleException(String key, Object[] values)
Construct an action error with the specified replacement values.

Parameters: key Message key for this message values Array of replacement values

Method Detail

getActionMessage

public ActionMessage getActionMessage()
Returns the error associated with the exception.

Returns: Value of property error.

Since: Struts 1.2

getError

public ActionError getError()

Deprecated: Use getActionMessage() instead. This will be removed after Struts 1.2.

Returns the error associated with the exception.

Returns: Value of property error.

getProperty

public String getProperty()
Returns the property associated with the exception.

Returns: Value of property.

setProperty

public void setProperty(String property)
Set the property associated with the exception. It can be a name of the edit field, which 'caused' the exception.
Copyright © 2000-2008 - The Apache Software Foundation