2 * Copyright (c) 2015 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowjava.protocol.api.connection;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.Error;
16 * Exception which is used to report that a particular request failed on the
17 * remote device (switch).
19 public class DeviceRequestFailedException extends OutboundQueueException {
20 private static final long serialVersionUID = 1L;
21 private final transient Error error;
23 public DeviceRequestFailedException(final String message, @NonNull final Error error) {
25 this.error = requireNonNull(error);
28 public DeviceRequestFailedException(final String message, @NonNull final Error error, final Throwable cause) {
29 super(message, cause);
30 this.error = requireNonNull(error);
33 @NonNull public Error getError() {