2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mielecloud.internal.webservice.exception;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.mielecloud.internal.webservice.ConnectionError;
20 * {@link RuntimeException} thrown if the Miele service is not available or unable to handle requests.
22 * @author Björn Lange - Initial contribution
25 public class MieleWebserviceException extends RuntimeException {
27 private static final long serialVersionUID = 6268725866086530042L;
29 private final ConnectionError connectionError;
31 public MieleWebserviceException(final String message, final ConnectionError connectionError) {
33 this.connectionError = connectionError;
36 public MieleWebserviceException(final String message, @Nullable final Throwable cause,
37 final ConnectionError connectionError) {
38 super(message, cause);
39 this.connectionError = connectionError;
42 public ConnectionError getConnectionError() {
43 return connectionError;