Skip to content

Package: DatastoreInternalError

DatastoreInternalError

nameinstructionbranchcomplexitylinemethod
DatastoreInternalError(Throwable, String)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getMessage()
M: 3 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) 2020 Eurotech and/or its affiliates and others
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech - initial API and implementation
11: *******************************************************************************/
12: package org.eclipse.kapua.service.datastore.exception;
13:
14: /**
15: * {@link DatastoreServiceError} to {@code throw} when there is an unrecoverable error performing an operation
16: *
17: * @since 1.3.0
18: */
19: public class DatastoreInternalError extends DatastoreServiceError {
20:
21: private final String message;
22:
23: /**
24: * Constructor.
25: *
26: * @param cause @param cause The root {@link Throwable} of this {@link DatastoreInternalError}.
27: * @since 1.3.0
28: */
29: public DatastoreInternalError(Throwable cause, String message) {
30: super(DatastoreServiceErrorCodes.INTERNAL_ERROR, cause, message);
31:
32: this.message = message;
33: }
34:
35: /**
36: * Gets the detail message associated with this {@link DatastoreInternalError}
37: *
38: * @return The message
39: * @since 1.3.0
40: */
41: @Override
42: public String getMessage() {
43: return message;
44: }
45: }