org.opendaylight.controller.remote.rpc.messages.ErrorResponse.java Source code

Java tutorial

Introduction

Here is the source code for org.opendaylight.controller.remote.rpc.messages.ErrorResponse.java

Source

/*
 * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.controller.remote.rpc.messages;

import com.google.common.base.Preconditions;

import java.io.Serializable;

public class ErrorResponse implements Serializable {

    private final Exception exception;

    public ErrorResponse(final Exception e) {
        Preconditions.checkNotNull(e, "Exception should be present for error message");
        this.exception = e;
    }

    public Exception getException() {
        return exception;
    }
}