001/*
002 * acme4j - Java ACME client
003 *
004 * Copyright (C) 2016 Richard "Shred" Körber
005 *   http://acme4j.shredzone.org
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
013 */
014package org.shredzone.acme4j.exception;
015
016import java.io.Serial;
017
018/**
019 * A runtime exception that is thrown when the response of the server is violating the
020 * RFC, and could not be handled or parsed for that reason. It is an indicator that the CA
021 * does not fully comply with the RFC, and is usually not expected to be thrown.
022 */
023public class AcmeProtocolException extends RuntimeException {
024    @Serial
025    private static final long serialVersionUID = 2031203835755725193L;
026
027    /**
028     * Creates a new {@link AcmeProtocolException}.
029     *
030     * @param msg
031     *            Reason of the exception
032     */
033    public AcmeProtocolException(String msg) {
034        super(msg);
035    }
036
037    /**
038     * Creates a new {@link AcmeProtocolException}.
039     *
040     * @param msg
041     *            Reason of the exception
042     * @param cause
043     *            Cause
044     */
045    public AcmeProtocolException(String msg, Throwable cause) {
046        super(msg, cause);
047    }
048
049}