com.stratelia.webactiv.util.exception
Class SilverpeasRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.stratelia.webactiv.util.exception.SilverpeasRuntimeException
All Implemented Interfaces:
FromModule, WithNested, Serializable
Direct Known Subclasses:
AttachmentException, ExternalExecutionException, FileHandlerException, ForbiddenRuntimeException, FormRuntimeException, ImageToolException, PropertyNotFoundRuntimeException, QuotaRuntimeException, ThumbnailRuntimeException, UtilException, VideoThumbnailExtractorException, ViewerException

public abstract class SilverpeasRuntimeException
extends RuntimeException
implements WithNested, FromModule

SilverpeasRuntimeException est la racine de la hiérarchie des exception runtime silverpeas. Les exceptions Runtime ne sont pas obligatoirement traitées par le développeur. C'est pourquoi leur utilisation doit se faire après reflexion. La principale application des SilverpeasRuntimeException est l'utilisation au sein des EJB. En effet une RuntimeException qui traverse le conteneur annule la transaction en cours, et sera encapsulée dans une RemoteException. Le message que l'on donne à l'exception est très important, il doit etre affiché à l'utilisateur. C'est pourquoi le label est multilangue. Chaque classe heritant de SilverpeasRuntimeException doit surdefinir la fonction getModule qui retourne le nom du module (le meme nom que celui defini dans Silvertrace)

See Also:
Serialized Form

Field Summary
static int ERROR
           
static int FATAL
           
static int WARNING
           
 
Constructor Summary
SilverpeasRuntimeException(String callingClass, int errorLevel, String message)
           
SilverpeasRuntimeException(String callingClass, int errorLevel, String message, Exception nested)
           
SilverpeasRuntimeException(String callingClass, int errorLevel, String message, String extraParams)
           
SilverpeasRuntimeException(String callingClass, int errorLevel, String message, String extraParams, Throwable nested)
           
 
Method Summary
 int getErrorLevel()
          retourne le niveau de critissicité de l'exception
 String getMessageLang()
          This function must be defined by the Classes that herit from this one
 String getMessageLang(String language)
           
 Throwable getNested()
          retourne l'exception qui a provoqué la creation de celle-ci.
 void traceException()
           
 
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
 
Methods inherited from interface com.stratelia.webactiv.util.exception.FromModule
getModule
 

Field Detail

FATAL

public static final int FATAL
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

WARNING

public static final int WARNING
See Also:
Constant Field Values
Constructor Detail

SilverpeasRuntimeException

public SilverpeasRuntimeException(String callingClass,
                                  int errorLevel,
                                  String message)

SilverpeasRuntimeException

public SilverpeasRuntimeException(String callingClass,
                                  int errorLevel,
                                  String message,
                                  String extraParams)

SilverpeasRuntimeException

public SilverpeasRuntimeException(String callingClass,
                                  int errorLevel,
                                  String message,
                                  Exception nested)

SilverpeasRuntimeException

public SilverpeasRuntimeException(String callingClass,
                                  int errorLevel,
                                  String message,
                                  String extraParams,
                                  Throwable nested)
Method Detail

getNested

public Throwable getNested()
retourne l'exception qui a provoqué la creation de celle-ci. Permet l'encapsulation des exception technique.

Specified by:
getNested in interface WithNested
Returns:
L'exception précédente qui a provoqué celle-ci, null s'il n'y en a pas.

getMessageLang

public String getMessageLang()
This function must be defined by the Classes that herit from this one

Specified by:
getMessageLang in interface FromModule
Returns:
The SilverTrace's module name

getMessageLang

public String getMessageLang(String language)
Specified by:
getMessageLang in interface FromModule

traceException

public void traceException()
Specified by:
traceException in interface FromModule

getErrorLevel

public int getErrorLevel()
retourne le niveau de critissicité de l'exception

Specified by:
getErrorLevel in interface FromModule
Returns:
le niveau d'erreur, FATAL, ERROR, ou WARNING


Copyright © 2016 Silverpeas. All Rights Reserved.