2 * Copyright (c) 2016 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.openflowplugin.impl.util;
10 import java.util.Collection;
11 import org.opendaylight.yangtools.yang.common.RpcError;
14 * Util class for {@link RpcError}.
16 public final class ErrorUtil {
21 public static String errorsToString(final Collection<RpcError> rpcErrors) {
22 final StringBuilder errors = new StringBuilder();
23 if ((null != rpcErrors) && (rpcErrors.size() > 0)) {
24 for (final RpcError rpcError : rpcErrors) {
25 errors.append(rpcError.getMessage());
28 return errors.toString();