Package org.exoplatform.social.common
Class ExoSocialException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.exoplatform.social.common.ExoSocialException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ActivityStorageException,GroupSpaceBindingStorageException,IdentityStorageException,RelationshipStorageException,SpaceStorageException
public class ExoSocialException extends RuntimeException
The top exception class to handle exception for eXo Social.
Using this for displaying any error to user by using key for message bundle display;
The exception message and cause for displaying more information.- Since:
- Nov 9, 2010
- Author:
- hoatle (hoatlevan at gmail dot com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExoSocialException(String msgKey)Only message key available.ExoSocialException(String msgKey, String msg)messageKey and exception message is available.ExoSocialException(String msgKey, String[] msgArgs)message key and messageArguments are available.ExoSocialException(String msgKey, String[] msgArgs, String msg, Throwable cause)The message key with messageArguments, exception message and cause.ExoSocialException(String msgKey, String msg, Throwable cause)The message key with exception message and cause.ExoSocialException(String msgKey, Throwable cause)The message key with exception message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDataInput()Gets the date input, which is useful for developers.String[]getMessageArguments()Gets the message arguments.StringgetMessageKey()Gets the message key.voidsetDataInput(String jsonDataInput)Sets the json data input for displaying.voidsetMessageArguments(String[] msgArgs)Sets message arguments.voidsetMessageKey(String msgKey)Sets message key.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ExoSocialException
public ExoSocialException(String msgKey)
Only message key available.- Parameters:
msgKey- message key
-
ExoSocialException
public ExoSocialException(String msgKey, String[] msgArgs)
message key and messageArguments are available.- Parameters:
msgKey- message keymsgArgs- message arguments
-
ExoSocialException
public ExoSocialException(String msgKey, String msg)
messageKey and exception message is available.- Parameters:
msgKey- messageKeymsg- addition message (useful to developer).
-
ExoSocialException
public ExoSocialException(String msgKey, Throwable cause)
The message key with exception message and cause.- Parameters:
msgKey- message keycause- the cause
-
ExoSocialException
public ExoSocialException(String msgKey, String msg, Throwable cause)
The message key with exception message and cause.- Parameters:
msgKey- message keymsg- the message which is useful for developers.cause- the cause
-
ExoSocialException
public ExoSocialException(String msgKey, String[] msgArgs, String msg, Throwable cause)
The message key with messageArguments, exception message and cause.- Parameters:
msgKey- message keymsgArgs- message argumentsmsg- message, the message is useful for developer Example: Node not found.cause- the cause
-
-
Method Detail
-
getMessageKey
public final String getMessageKey()
Gets the message key.- Returns:
- mesageKey
-
setMessageKey
public final void setMessageKey(String msgKey)
Sets message key.- Parameters:
msgKey- the messag key
-
getMessageArguments
public final String[] getMessageArguments()
Gets the message arguments.- Returns:
- the message arguments
-
setMessageArguments
public final void setMessageArguments(String[] msgArgs)
Sets message arguments.- Parameters:
msgArgs- the mesage arguments
-
getDataInput
public final String getDataInput()
Gets the date input, which is useful for developers. Usually, this is a json string serialized from objects.- Returns:
- the data input.
-
setDataInput
public final void setDataInput(String jsonDataInput)
Sets the json data input for displaying.- Parameters:
jsonDataInput- the json data input
-
-