org.exoplatform.social.common
Class ExoSocialException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.exoplatform.social.common.ExoSocialException
All Implemented Interfaces:
Serializable

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
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
 String getDataInput()
          Gets the date input, which is useful for developers.
 String[] getMessageArguments()
          Gets the message arguments.
 String getMessageKey()
          Gets the message key.
 void setDataInput(String jsonDataInput)
          Sets the json data input for displaying.
 void setMessageArguments(String[] msgArgs)
          Sets message arguments.
 void setMessageKey(String msgKey)
          Sets message key.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 key
msgArgs - message arguments

ExoSocialException

public ExoSocialException(String msgKey,
                          String msg)
messageKey and exception message is available.

Parameters:
msgKey - messageKey
msg - addition message (useful to developer).

ExoSocialException

public ExoSocialException(String msgKey,
                          Throwable cause)
The message key with exception message and cause.

Parameters:
msgKey - message key
cause - the cause

ExoSocialException

public ExoSocialException(String msgKey,
                          String msg,
                          Throwable cause)
The message key with exception message and cause.

Parameters:
msgKey - message key
msg - 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 key
msgArgs - message arguments
msg - 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


Copyright © 2013 eXo Platform SAS. All Rights Reserved.