]> git.basschouten.com Git - openhab-addons.git/blob
65423cd4ff40a85e30cda43221008816ce794d87
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.vdr.internal.svdrp;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * The {@link SVDRPParseResponseException} is thrown if a SVDRP Response cannot be parsed as expected
20  *
21  * @author Matthias Klocke - Initial contribution
22  */
23 @NonNullByDefault
24 public class SVDRPParseResponseException extends SVDRPException {
25
26     private static final long serialVersionUID = 631229205838438373L;
27
28     public SVDRPParseResponseException(SVDRPResponse response) {
29         super(response.getMessage());
30     }
31
32     public SVDRPParseResponseException(SVDRPResponse response, Throwable cause) {
33         super(response.getMessage(), cause);
34     }
35
36     public SVDRPParseResponseException(@Nullable String message) {
37         super(message);
38         String newMessage = message;
39         if (newMessage == null) {
40             newMessage = "Null Value on Exception Message";
41         }
42     }
43
44     public SVDRPParseResponseException(@Nullable String message, Throwable cause) {
45         super(message, cause);
46         String newMessage = message;
47         if (newMessage == null) {
48             newMessage = "Null Value on Exception Message";
49         }
50     }
51 }