public class ExceptionHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
buildExceptionString(Throwable th) |
static void |
checkAliasAlreadyExists(Object exception) |
static void |
checkEmailAlreadyExists(Object exception)
Check email already exists.
|
static void |
checkEmailValidation(Object exception)
Check email validation.
|
static void |
checkLdapUserException(Object exception) |
static void |
checkSecurityCodeNotFound(Object exception)
Check security code not found.
|
static boolean |
isConstraintViolationException(Throwable throwable)
Checks if the given exception has its cause in a database constraint violation, that can be a
hint of concurrent access (e.g.
|
static boolean |
isConstraintViolationExceptionWithoutCause(Throwable th)
Checks if the given exception has is a database constraint violation, that can be a hint of
concurrent access (e.g.
|
public static String buildExceptionString(Throwable th)
th
- the exceptionpublic static void checkAliasAlreadyExists(Object exception) throws AliasAlreadyExistsException
exception
- The exception object.AliasAlreadyExistsException
- The alias already exists exception.public static void checkEmailAlreadyExists(Object exception) throws EmailAlreadyExistsException
exception
- the exceptionEmailAlreadyExistsException
- the email already exists exceptionpublic static void checkEmailValidation(Object exception) throws EmailValidationException
exception
- the exceptionEmailValidationException
- the email validation exceptionpublic static void checkLdapUserException(Object exception) throws LdapUserException
LdapUserException
public static void checkSecurityCodeNotFound(Object exception) throws SecurityCodeNotFoundException
exception
- the exceptionSecurityCodeNotFoundException
- the security code not found exceptionpublic static boolean isConstraintViolationException(Throwable throwable)
throwable
- the exception to checkpublic static boolean isConstraintViolationExceptionWithoutCause(Throwable th)
isConstraintViolationException(Throwable)
th
- the exception to checkCopyright © 2019 Communote team. All rights reserved.