/**
 * Copyright (c) 2010-2021 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.vdr.internal.svdrp;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

/**
 * The {@link SVDRPParseResponseException} is thrown if a SVDRP Response cannot be parsed as expected
 *
 * @author Matthias Klocke - Initial contribution
 */
@NonNullByDefault
public class SVDRPParseResponseException extends SVDRPException {

    private static final long serialVersionUID = 631229205838438373L;

    public SVDRPParseResponseException(SVDRPResponse response) {
        super(response.getMessage());
    }

    public SVDRPParseResponseException(SVDRPResponse response, Throwable cause) {
        super(response.getMessage(), cause);
    }

    public SVDRPParseResponseException(@Nullable String message) {
        super(message);
        String newMessage = message;
        if (newMessage == null) {
            newMessage = "Null Value on Exception Message";
        }
    }

    public SVDRPParseResponseException(@Nullable String message, Throwable cause) {
        super(message, cause);
        String newMessage = message;
        if (newMessage == null) {
            newMessage = "Null Value on Exception Message";
        }
    }
}
