Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[airq] Improve error handling (#16694)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
- Loading branch information
Showing
4 changed files
with
269 additions
and
197 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...nding.airq/src/main/java/org/openhab/binding/airq/internal/AirqEmptyResonseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.airq.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* Exception for handling an empty response. | ||
* | ||
* @author Fabian Wolter - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class AirqEmptyResonseException extends AirqException { | ||
private static final long serialVersionUID = 1423144673651821622L; | ||
|
||
public AirqEmptyResonseException() { | ||
super("Device sent an empty response"); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...g.openhab.binding.airq/src/main/java/org/openhab/binding/airq/internal/AirqException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.airq.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* General exception for this binding. | ||
* | ||
* @author Fabian Wolter - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class AirqException extends Exception { | ||
private static final long serialVersionUID = 8255154215873928896L; | ||
|
||
public AirqException() { | ||
// nothing | ||
} | ||
|
||
public AirqException(String message) { | ||
super(message); | ||
} | ||
|
||
public AirqException(Exception exception) { | ||
super(exception); | ||
} | ||
|
||
public AirqException(String message, Exception exception) { | ||
super(message, exception); | ||
} | ||
} |
Oops, something went wrong.