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.mikrotik.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.thing.ChannelUID;
18 import org.openhab.core.thing.ThingUID;
21 * The {@link ChannelUpdateException} is used to bubble up channel update errors which are mainly
22 * happens during data conversion. But those errors should not bring bridge offline and break normal
25 * @author Oleg Vivtash - Initial contribution
28 public class ChannelUpdateException extends RuntimeException {
29 static final long serialVersionUID = 1L;
31 private final ThingUID thingUID;
32 private final ChannelUID channelID;
34 public ChannelUpdateException(ThingUID thingUID, ChannelUID channelUID, Throwable cause) {
36 this.thingUID = thingUID;
37 this.channelID = channelUID;
41 public @Nullable String getMessage() {
42 return String.format("%s @ %s/%s", super.getMessage(), thingUID, channelID);