]> git.basschouten.com Git - openhab-addons.git/blob
f23fcea3390d22dc9a08883fc54dc8edf9aa3131
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.mielecloud.internal.webservice.exception;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.mielecloud.internal.webservice.ConnectionError;
17
18 /**
19  * {@link RuntimeException} thrown if a transient error occurred which the binding can recover from by retrying.
20  *
21  * @author Björn Lange - Initial contribution
22  */
23 @NonNullByDefault
24 public class MieleWebserviceTransientException extends RuntimeException {
25     private static final long serialVersionUID = -1863609233382694104L;
26
27     private final ConnectionError connectionError;
28
29     public MieleWebserviceTransientException(final String message, final ConnectionError connectionError) {
30         super(message);
31         this.connectionError = connectionError;
32     }
33
34     public MieleWebserviceTransientException(final String message, final Throwable cause,
35             final ConnectionError connectionError) {
36         super(message, cause);
37         this.connectionError = connectionError;
38     }
39
40     public ConnectionError getConnectionError() {
41         return connectionError;
42     }
43 }