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.homeconnect.internal.client.exception;
15 import static java.lang.String.format;
17 import java.util.Date;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
22 * API communication exception
24 * @author Jonas BrĂ¼stel - Initial contribution
28 public class CommunicationException extends Exception {
30 private static final long serialVersionUID = 1L;
32 public CommunicationException(String message, Throwable cause) {
33 super(message, cause);
36 public CommunicationException(String message) {
40 public CommunicationException(Throwable cause) {
44 public CommunicationException(int code, String message, String body) {
45 super(format("Communication error! response code: %d, message: %s, body: %s (Tried at %s)", code, message, body,