@@ -0,0 +1,1907 @@
+/**%0A * Copyright (c) 2017 Bosch Software Innovations GmbH.%0A *%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A *    Bosch Software Innovations GmbH - initial creation%0A */%0A%0Apackage org.eclipse.hono.util;%0A%0Aimport java.util.Objects;%0A%0Aimport org.apache.qpid.proton.amqp.Symbol;%0Aimport org.apache.qpid.proton.amqp.transport.AmqpError;%0Aimport org.apache.qpid.proton.amqp.transport.ErrorCondition;%0A%0Aimport io.vertx.proton.ProtonHelper;%0A%0A/**%0A * An exception wrapping an %7B@link AmqpError%7D.%0A *%0A */%0Apublic final class AmqpErrorException extends RuntimeException %7B%0A%0A    private static final long serialVersionUID = 1L;%0A    private final Symbol error;%0A%0A    /**%0A     * Creates a new exception for an error and description.%0A     * %0A     * @param error%0A     * @param description%0A     */%0A    public AmqpErrorException(final Symbol error, final String description) %7B%0A        super(Objects.requireNonNull(description));%0A        this.error = Objects.requireNonNull(error);%0A    %7D%0A%0A    /**%0A     * Creates a new exception for an error and description.%0A     * %0A     * @param error%0A     * @param description%0A     */%0A    public AmqpErrorException(final String error, final String description) %7B%0A        super(Objects.requireNonNull(description));%0A        this.error = Symbol.getSymbol(Objects.requireNonNull(error));%0A    %7D%0A%0A    %0A    /**%0A     * @return The error.%0A     */%0A    public final Symbol getError() %7B%0A        return error;%0A    %7D%0A%0A    /**%0A     * Gets an AMQP %7B@link ErrorCondition%7D based on this exception's error and description.%0A     * %0A     * @return The condition.%0A     */%0A    public final ErrorCondition asErrorCondition() %7B%0A        return ProtonHelper.condition(error.toString(), getMessage());%0A    %7D%0A%7D%0A

Add exception for conveying AMQP errors.