|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.stratelia.webactiv.util.exception.SilverpeasException
public abstract class SilverpeasException
SilverpeasException est la racine de la hiérarchie d'exception silverpeas. Toutes les classes d'exception spécifiques aux differents modules doivent dériver (directement ou non) de SilverpeasException. La page d'erreur globale à l'application ne saura traiter correctement que les SilverpeasException. Les autres exception (ou error ou runtime) provoqueront l'affichage d'une page d'erreur imprévue. 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 SilverpeasException doit surdefinir la fonction getModule qui retourne le nom du module (le meme nom que celui defini dans Silvertrace)
Field Summary | |
---|---|
static int |
ERROR
|
static int |
FATAL
|
static int |
WARNING
|
Constructor Summary | |
---|---|
SilverpeasException(Exception exception)
|
|
SilverpeasException(String message)
Deprecated. |
|
SilverpeasException(String message,
Exception nested)
Deprecated. |
|
SilverpeasException(String message,
Exception nested,
int errorLevel)
Deprecated. |
|
SilverpeasException(String callingClass,
int errorLevel,
String message)
|
|
SilverpeasException(String callingClass,
int errorLevel,
String message,
Exception nested)
|
|
SilverpeasException(String callingClass,
int errorLevel,
String message,
String extraParams)
|
|
SilverpeasException(String callingClass,
int errorLevel,
String message,
String extraParams,
Exception nested)
|
Method Summary | |
---|---|
static Collection<Throwable> |
getChainedExceptions(Throwable e)
méthode utilitaire dont le role est de représenter les exceptions encapsulées sous forme d'une collection. |
int |
getErrorLevel()
retourne le niveau de critissicité de l'exception |
String |
getExtraInfos()
|
String |
getMessageLang()
|
String |
getMessageLang(String language)
|
abstract String |
getModule()
This function must be defined by the Classes that herit from this one |
Exception |
getNested()
retourne l'exception qui a provoqué la creation de celle-ci. |
void |
printStackTrace()
|
void |
printStackTrace(PrintStream s)
|
void |
printStackTrace(PrintWriter w)
|
void |
traceException()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FATAL
public static final int ERROR
public static final int WARNING
Constructor Detail |
---|
public SilverpeasException(Exception exception)
public SilverpeasException(String message)
message
- Le label multilangue. Ex : "impossibleDeFabriquerUneConnexionBDD". Le label est
traduit dans des fichiers de properties.public SilverpeasException(String message, Exception nested)
message
- Le label multilangue. Ex : "impossibleDeFabriquerUneConnexionBDD". Le label est
traduit dans des fichiers de properties.nested
- L'exception qui a provoqué le problème. nested peut etre une SilverpeasException
ou une exception technique (SQLException, RemoteException...)public SilverpeasException(String message, Exception nested, int errorLevel)
message
- Le label multilangue. Ex : "impossibleDeFabriquerUneConnexionBDD". Le label est
traduit dans des fichiers de properties.nested
- L'exception qui a provoqué le problème. nested peut etre une SilverpeasException
ou une exception technique (SQLException, RemoteException...)errorLevel
- Le niveau de critissicité de l'erreur (FATAL, ERROR, ou WARNING)public SilverpeasException(String callingClass, int errorLevel, String message)
public SilverpeasException(String callingClass, int errorLevel, String message, String extraParams)
public SilverpeasException(String callingClass, int errorLevel, String message, Exception nested)
public SilverpeasException(String callingClass, int errorLevel, String message, String extraParams, Exception nested)
Method Detail |
---|
public Exception getNested()
getNested
in interface WithNested
public void printStackTrace()
printStackTrace
in class Throwable
public void printStackTrace(PrintStream s)
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter w)
printStackTrace
in class Throwable
public abstract String getModule()
getModule
in interface FromModule
public String getMessageLang()
getMessageLang
in interface FromModule
public String getMessageLang(String language)
getMessageLang
in interface FromModule
public void traceException()
traceException
in interface FromModule
public int getErrorLevel()
getErrorLevel
in interface FromModule
public String getExtraInfos()
public static Collection<Throwable> getChainedExceptions(Throwable e)
e
- L'exception de plus haut niveau
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |