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
9 package org.opendaylight.openflowplugin.impl.util;
11 import java.util.Collection;
12 import org.opendaylight.yangtools.yang.common.RpcError;
15 * Util class for {@link RpcError}.
17 public final class ErrorUtil {
20 throw new IllegalStateException("This class should not be instantiated.");
23 public static final String errorsToString(final Collection<RpcError> rpcErrors) {
24 final StringBuilder errors = new StringBuilder();
25 if ((null != rpcErrors) && (rpcErrors.size() > 0)) {
26 for (final RpcError rpcError : rpcErrors) {
27 errors.append(rpcError.getMessage());
30 return errors.toString();