Package com.saperion.ngc.util
Class UiExceptionThrower
- java.lang.Object
-
- com.saperion.ngc.util.UiExceptionThrower
-
public class UiExceptionThrower extends java.lang.Object
Utility class for UI-Exception handling.
-
-
Constructor Summary
Constructors Constructor Description UiExceptionThrower(java.lang.Class<?> clazz, java.lang.String methodName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
throwIt(java.lang.Exception e)
Throw an NgcUiException containing a log-message only.void
throwIt(java.lang.Exception e, java.lang.String localizationKey)
Throw an NgcUiException containing both a log-message and an error-message for the user.void
throwIt(java.lang.Exception e, java.lang.String localizationKey, java.util.Map<java.lang.String,java.lang.String> replacements)
Throw an NgcUiException containing both a log-message and an error-message for the user.void
throwIt(java.lang.String localizationKey)
Throw an NgcUiException containing both an error-message for the user only.void
throwIt(java.lang.String message, java.lang.String localizationKey)
Throw an NgcUiException containing both a log-message and an error-message for the user.void
throwIt(java.lang.String message, java.lang.String localizationKey, java.util.Map<java.lang.String,java.lang.String> replacements)
Throws a NgcUiException containing the error message and the user message with replacements.
-
-
-
Method Detail
-
throwIt
public void throwIt(java.lang.Exception e, java.lang.String localizationKey) throws NgcUiException
Throw an NgcUiException containing both a log-message and an error-message for the user.- Parameters:
e
- causing exceptionlocalizationKey
- localization key for user error-message- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(java.lang.Exception e, java.lang.String localizationKey, java.util.Map<java.lang.String,java.lang.String> replacements) throws NgcUiException
Throw an NgcUiException containing both a log-message and an error-message for the user.- Parameters:
e
- causing exceptionlocalizationKey
- localization key for user error-messagereplacements
- string replacements for user error message- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(java.lang.String message, java.lang.String localizationKey) throws NgcUiException
Throw an NgcUiException containing both a log-message and an error-message for the user.- Parameters:
message
- log-messagelocalizationKey
- localization key for user error-message- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(java.lang.String localizationKey) throws NgcUiException
Throw an NgcUiException containing both an error-message for the user only.- Parameters:
localizationKey
- localization key for user error-message- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(java.lang.Exception e) throws NgcUiException
Throw an NgcUiException containing a log-message only.- Parameters:
e
- causing exception- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(java.lang.String message, java.lang.String localizationKey, java.util.Map<java.lang.String,java.lang.String> replacements) throws NgcUiException
Throws a NgcUiException containing the error message and the user message with replacements.- Parameters:
message
- error messagelocalizationKey
- localization key for user messagereplacements
- replacements for user message- Throws:
NgcUiException
- exception to be handled by view
-
-