Package org.silverpeas.core.util.error
Class SilverpeasTransverseErrorUtil
- java.lang.Object
-
- org.silverpeas.core.util.error.SilverpeasTransverseErrorUtil
-
- Direct Known Subclasses:
SilverpeasTransverseWebErrorUtil
public class SilverpeasTransverseErrorUtil extends Object
Centralized treatment of transverse exceptions :DataStorageQuotaException
ComponentFileFilterException
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description SilverpeasTransverseErrorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends Exception>
StringperformExceptionMessage(E exception, String language)
Retrieves a formatted exception message if any handled from a given exceptionstatic <E extends Exception>
voidstopTransverseErrorIfAny(E exception)
Stops a runtime transverse exception existsstatic <E extends Exception>
voidthrowTransverseErrorIfAny(E exception, String language)
Checks from a exception if a runtime transverse exception has to be thrown
-
-
-
Method Detail
-
stopTransverseErrorIfAny
public static <E extends Exception> void stopTransverseErrorIfAny(E exception) throws E extends Exception
Stops a runtime transverse exception exists- Parameters:
exception
-- Throws:
E extends Exception
-
throwTransverseErrorIfAny
public static <E extends Exception> void throwTransverseErrorIfAny(E exception, String language) throws DataStorageQuotaException, ComponentFileFilterException
Checks from a exception if a runtime transverse exception has to be thrown- Parameters:
exception
- the http servlet requestlanguage
- the language of current user- Throws:
DataStorageQuotaException
ComponentFileFilterException
-
-