Package: DuplicateUserTypeException
DuplicateUserTypeException
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DuplicateUserTypeException(String) |
|
|
|
|
|
Coverage
1: package de.fhdw.wtf.persistence.exception;
2:
3: import java.sql.SQLException;
4:
5: /**
6: * This exception can be thrown if the attempt to create duplicate UserTypes occurs.
7: */
8: public class DuplicateUserTypeException extends PersistenceException {
9:         /**
10:          * the message of the exception.
11:          */
12:         private static final String DUPLICATE_USER_TYPE_MESSAGE = "An UserType with the following name already exists: ";
13:         
14:         /**
15:          *
16:          */
17:         private static final long serialVersionUID = 1L;
18:         
19:         /**
20:          * Returns an instance of DuplicateUserTypeException.
21:          *
22:          * @param userTypeName
23:          * is needed to show an UserTypes name as part of the exception-message.
24:          */
25:         public DuplicateUserTypeException(final String userTypeName) {
26:                 super(DuplicateUserTypeException.DUPLICATE_USER_TYPE_MESSAGE + userTypeName, new SQLException());
27:         }
28: }