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.freeboxos.internal.api;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.freeboxos.internal.api.Response.ErrorCode;
19 * Exception for errors when using the Freebox API
21 * @author Gaƫl L'hopital - Initial contribution
24 public class FreeboxException extends Exception {
25 private static final long serialVersionUID = 9197365222439228186L;
26 private ErrorCode errorCode = ErrorCode.NONE;
28 public FreeboxException(String format, Object... args) {
29 super(String.format(format, args));
32 public FreeboxException(Exception cause, String format, Object... args) {
33 super(String.format(format, args), cause);
36 public FreeboxException(ErrorCode errorCode, String message) {
38 this.errorCode = errorCode;
41 public ErrorCode getErrorCode() {