Skip to content

Package: ClientException

ClientException

nameinstructionbranchcomplexitylinemethod
ClientException(ClientErrorCodes)
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%
ClientException(ClientErrorCodes, 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%
ClientException(ClientErrorCodes, Throwable)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
ClientException(ClientErrorCodes, 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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 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.service.elasticsearch.client.exception;
14:
15: import org.eclipse.kapua.KapuaException;
16:
17: /**
18: * {@link ClientException} definition.
19: * <p>
20: * This is the base {@link KapuaException} for all detailed {@link Exception} of this module.
21: *
22: * @since 1.0.0
23: */
24: public class ClientException extends KapuaException {
25:
26: private static final long serialVersionUID = 2393001020208113850L;
27:
28: private static final String ELASTICSEARCH_CLIENT_ERROR_MESSAGES = "elasticsearch-client-error-messages";
29:
30: /**
31: * Construct the exception with the provided error code
32: *
33: * @param code The {@link ClientErrorCodes}
34: * @since 1.0.0
35: */
36: public ClientException(ClientErrorCodes code) {
37: super(code);
38: }
39:
40: /**
41: * Constructor.
42: *
43: * @param code The {@link ClientErrorCodes}
44: * @param arguments Additional argument associated with the {@link ClientException}.
45: * @since 1.0.0
46: */
47: public ClientException(ClientErrorCodes code, Object... arguments) {
48: super(code, arguments);
49: }
50:
51: /**
52: * Constructor.
53: *
54: * @param code The {@link ClientErrorCodes}
55: * @param cause The root {@link Throwable} of this {@link ClientException}.
56: * @param arguments Additional argument associated with the {@link ClientException}.
57: * @since 1.0.0
58: */
59: public ClientException(ClientErrorCodes code, Throwable cause, Object... arguments) {
60: super(code, cause, arguments);
61: }
62:
63:
64: /**
65: * Construct the exception with the provided code, throwable and message
66: *
67: * @param code The {@link ClientErrorCodes}
68: * @param cause The root {@link Throwable} of this {@link ClientException}.
69: * @since 1.0.0
70: */
71: public ClientException(ClientErrorCodes code, Throwable cause) {
72: super(code, cause);
73: }
74:
75: @Override
76: protected String getKapuaErrorMessagesBundle() {
77: return ELASTICSEARCH_CLIENT_ERROR_MESSAGES;
78: }
79: }