308c6ddebe137bc70213885721f941250778ed70
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / RPCFailedException.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.statistics.manager;
9
10 import java.util.Collection;
11
12 import org.opendaylight.yangtools.yang.common.RpcError;
13
14 final class RPCFailedException extends RuntimeException {
15     private static final long serialVersionUID = 1L;
16     private final Collection<RpcError> errors;
17
18     public RPCFailedException(final String message, final Collection<RpcError> errors) {
19         super(message);
20         this.errors = errors;
21     }
22
23     @Override
24     public String toString() {
25         return "RPCFailedException [errors=" + errors + ", message=" + getMessage() + ']';
26     }
27 }