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 com.google.common.base.Preconditions;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.Error;
15 * Exception which is used to report that a particular request failed on the
16 * remote device (switch).
18 public class DeviceRequestFailedException extends OutboundQueueException {
19 private static final long serialVersionUID = 1L;
20 private final Error error;
22 public DeviceRequestFailedException(final String message, @Nonnull final Error error) {
24 this.error = Preconditions.checkNotNull(error);
27 public DeviceRequestFailedException(final String message, @Nonnull final Error error, final Throwable cause) {
28 super(message, cause);
29 this.error = Preconditions.checkNotNull(error);
32 @Nonnull public Error getError() {