Skip to content

Package: KapuaConfigurationException

KapuaConfigurationException

nameinstructionbranchcomplexitylinemethod
KapuaConfigurationException(KapuaConfigurationErrorCodes)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
KapuaConfigurationException(KapuaConfigurationErrorCodes, Object[])
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
KapuaConfigurationException(KapuaConfigurationErrorCodes, Throwable, Object[])
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getKapuaErrorMessagesBundle()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
internalError(String)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.commons.configuration.exception;
14:
15: import org.eclipse.kapua.KapuaException;
16:
17: /**
18: * Configuration exception.
19: *
20: * @since 1.0
21: */
22: public class KapuaConfigurationException extends KapuaException {
23:
24: private static final long serialVersionUID = -5191015333552703367L;
25:
26: private static final String KAPUA_ERROR_MESSAGES = "kapua-configuration-service-error-messages";
27:
28: /**
29: * Builds a new KapuaException instance based on the supplied KapuaErrorCode.
30: *
31: * @param code
32: */
33: public KapuaConfigurationException(KapuaConfigurationErrorCodes code) {
34: super(code);
35: }
36:
37: /**
38: * Builds a new KapuaException instance based on the supplied KapuaErrorCode
39: * and optional arguments for the associated exception message.
40: *
41: * @param code
42: * @param arguments
43: */
44: public KapuaConfigurationException(KapuaConfigurationErrorCodes code, Object... arguments) {
45: super(code, arguments);
46: }
47:
48: /**
49: * Builds a new KapuaAccountException instance based on the supplied KapuaAccountErrorCode,
50: * an Throwable cause, and optional arguments for the associated exception message.
51: *
52: * @param code
53: * @param cause
54: * @param arguments
55: */
56: public KapuaConfigurationException(KapuaConfigurationErrorCodes code, Throwable cause, Object... arguments) {
57: super(code, cause, arguments);
58: }
59:
60: /**
61: * Factory method to build an KapuaAccountException with the KapuaAccountErrorCode.INTERNAL_ERROR,
62: * and optional arguments for the associated exception message.
63: *
64: * @param message
65: * @return
66: */
67: public static KapuaConfigurationException internalError(String message) {
68: return new KapuaConfigurationException(KapuaConfigurationErrorCodes.INTERNAL_ERROR, null, message);
69: }
70:
71: @Override
72: protected String getKapuaErrorMessagesBundle() {
73: return KAPUA_ERROR_MESSAGES;
74: }
75: }