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.tellstick.internal.local;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import org.tellstick.device.TellstickException;
20 * {@link TelldusLocalException} is used when there is exception communicating with Telldus local API.
21 * This exception extends the Telldus Core exception.
23 * @author Jan Gustafsson - Initial contribution
26 public class TelldusLocalException extends TellstickException {
28 public TelldusLocalException(Exception source) {
30 this.initCause(source);
33 private static final long serialVersionUID = 3067179547449454711L;
36 public @NonNull String getMessage() {
37 Throwable throwable = getCause();
38 if (throwable != null) {
39 String localMessage = throwable.getMessage();
40 if (localMessage != null) {