org.silverpeas.util.error
Class SilverpeasTransverseErrorUtil

java.lang.Object
  extended by org.silverpeas.util.error.SilverpeasTransverseErrorUtil
Direct Known Subclasses:
SilverpeasTransverseWebErrorUtil

public class SilverpeasTransverseErrorUtil
extends Object

Centralized treatment of transverse exceptions : DataStorageQuotaException ComponentFileFilterException

Author:
Yohann Chastagnier

Constructor Summary
SilverpeasTransverseErrorUtil()
           
 
Method Summary
static
<E extends Exception>
String
performExceptionMessage(E exception, String language)
          Retrieves a formatted exception message if any handled from a given exception
static
<E extends Exception>
void
stopTransverseErrorIfAny(E exception)
          Stops a runtime transverse exception exists
static
<E extends Exception>
void
throwTransverseErrorIfAny(E exception, String language)
          Checks from a exception if a runtime transverse exception has to be thrown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SilverpeasTransverseErrorUtil

public SilverpeasTransverseErrorUtil()
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 request
language - the language of current user
Throws:
DataStorageQuotaException
ComponentFileFilterException

performExceptionMessage

public static <E extends Exception> String performExceptionMessage(E exception,
                                                                   String language)
Retrieves a formatted exception message if any handled from a given exception

Parameters:
exception -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.