|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
flex.messaging.LocalizedException
The LocalizedException class is the base class for server
exceptions that use localized error message and details strings. This class overloads
setMessage and setDetails to support passing an error
number and an optional message variant that is used to look up a localized error
message or details string using a ResourceLoader. These methods also
set the number property of the exception instance.
The various overloads optionally support specifying a target locale as well as arguments to substitute into the localized string if it is parameterized.
Localized error message and details strings are stored in the flex.messaging.errors resource bundle. Entries must have the following format.
ResourceLoader,
Serialized Form| Constructor Summary | |
LocalizedException()
Create a LocalizedException with the default ResourceLoader. |
|
LocalizedException(flex.messaging.util.ResourceLoader resourceLoader)
Create a LocalizedException that will use the specified ResourceLoader. |
|
| Method Summary | |
String |
getDetails()
Returns the exception details. |
String |
getMessage()
Returns the exception message. |
int |
getNumber()
Returns the localized exception number. |
protected flex.messaging.util.ResourceLoader |
getResourceLoader()
Returns the ResourceLoader used to load localized strings. |
Throwable |
getRootCause()
Returns the root cause for this exception. |
void |
setDetails(int number)
Sets the details property to a localized string based on error number. |
void |
setDetails(int number,
String variant)
Sets the details property to a localized string based on error number and variant. |
void |
setDetails(int number,
String variant,
Locale locale)
Sets the details property to a localized string based on error number, variant and target locale. |
void |
setDetails(int number,
String variant,
Locale locale,
Object[] arguments)
Sets the details property to a localized string based on error number, variant, and target locale. |
void |
setDetails(int number,
String variant,
Object[] arguments)
Sets the details property to a localized string based on error number and variant. |
void |
setDetails(String details)
Sets the exception details. |
void |
setMessage(int number)
Sets the message property to a localized string based on error number. |
void |
setMessage(int number,
Locale locale)
Sets the message property to a localized string based on error number and target locale. |
void |
setMessage(int number,
Object[] arguments)
Sets the message property to a localized string based on error number. |
void |
setMessage(int number,
String variant)
Sets the message property to a localized string based on error number and variant. |
void |
setMessage(int number,
String variant,
Locale locale)
Sets the message property to a localized string based on error number, variant and target locale. |
void |
setMessage(int number,
String variant,
Locale locale,
Object[] arguments)
Sets the message property to a localized string based on error number, variant and target locale. |
void |
setMessage(int number,
String variant,
Object[] arguments)
Sets the message property to a localized string based on error number and variant. |
void |
setMessage(String message)
Sets the exception message. |
void |
setNumber(int number)
Sets the localized exception number. |
void |
setRootCause(Throwable cause)
Sets the root cause for this exception. |
String |
toString()
Returns a string represenation of the exception. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LocalizedException()
public LocalizedException(flex.messaging.util.ResourceLoader resourceLoader)
resourceLoader - | Method Detail |
public String getDetails()
public void setDetails(String details)
details - The exception details.public void setMessage(int number)
number - The error number for this exception instance.
public void setMessage(int number,
Locale locale)
number - The error number for this exception instance.locale - The target locale for error message lookup.
public void setMessage(int number,
Object[] arguments)
number - The error number for this exception instance.arguments - The arguments to substitute into the error message.
public void setMessage(int number,
String variant)
number - The error number for this exception instance.variant - The variant of the error message for this instance.
public void setMessage(int number,
String variant,
Locale locale)
number - The error number for this exception instance.variant - The variant of the error message for this instance.locale - The target locale for error message lookup.
public void setMessage(int number,
String variant,
Object[] arguments)
number - The error number for this exception instance.variant - The varient of the error message for this instance.arguments - The arguments to substitute into the error message.
public void setMessage(int number,
String variant,
Locale locale,
Object[] arguments)
number - The error number for this exception instance.variant - The variant of the error message for this instance.locale - The target locale for error message lookup.arguments - The arguments to substitute into the error message.public String getMessage()
public void setMessage(String message)
message - The exception message.public void setNumber(int number)
number - The localized exception number.public int getNumber()
public void setDetails(int number)
number - The error number to lookup details for.
public void setDetails(int number,
String variant)
number - The error number to lookup details for.variant - The variant of the details string to lookup.
public void setDetails(int number,
String variant,
Locale locale)
number - The error number to lookup details for.variant - The variant of the details string to lookup.locale - The target locale for the lookup.
public void setDetails(int number,
String variant,
Object[] arguments)
number - The error number to lookup details for.variant - The variant of the details string to lookup.arguments - The arguments to substitute into the details string.
public void setDetails(int number,
String variant,
Locale locale,
Object[] arguments)
number - The error number to lookup a localized details string for.variant - The variant of the details string to lookup.locale - The target locale for the lookup.arguments - The arguments to substitute into the details string.public Throwable getRootCause()
public void setRootCause(Throwable cause)
cause - The root cause for this exception.protected flex.messaging.util.ResourceLoader getResourceLoader()
ResourceLoader used to load localized strings.
ResourceLoader used to load localized strings.public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||