Package com.saperion.ngc.util
Class UiExceptionThrower
java.lang.Object
com.saperion.ngc.util.UiExceptionThrower
Utility class for UI-Exception handling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Throw an NgcUiException containing a log-message only.void
Throw an NgcUiException containing both a log-message and an error-message for the user.void
Throw an NgcUiException containing both a log-message and an error-message for the user.void
Throw an NgcUiException containing both an error-message for the user only.void
Throw an NgcUiException containing both a log-message and an error-message for the user.void
Throws a NgcUiException containing the error message and the user message with replacements.
-
Constructor Details
-
UiExceptionThrower
Constructor.- Parameters:
clazz
- the classmethodName
- the method name
-
-
Method Details
-
throwIt
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(Exception e, String localizationKey, Map<String, String> replacements) throws NgcUiExceptionThrow 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
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
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
Throw an NgcUiException containing a log-message only.- Parameters:
e
- causing exception- Throws:
NgcUiException
- exception to be handled by view
-
throwIt
public void throwIt(String message, String localizationKey, Map<String, String> replacements) throws NgcUiExceptionThrows 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
-