/*******************************************************************************
***  This file is part of Dux Rei Nummariae.                                 ***
***                                                                          ***
***  Copyright (C) 2017, 2018, 2019, 2020, 2021                              ***
***  John Schneiderman <Licensing _AT_ Schneiderman _DOT_ me>                ***
***                                                                          ***
***  This program is free software: you can redistribute it and/or modify it ***
***  under the terms of the GNU Affero General Public License as published   ***
***  by the Free Software Foundation, either version 3 of the License, or    ***
***  (at your option) any later version.                                     ***
***                                                                          ***
***  This program is distributed in the hope that it will be useful, but     ***
***  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
***  See the GNU Affero General Public License for more details.             ***
***                                                                          ***
***  You should have received a copy of the GNU Affero General Public License***
***  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
*******************************************************************************/
#ifndef DRN_CONVERSION_CONVERSIONERRORS_H_
#define DRN_CONVERSION_CONVERSIONERRORS_H_

#include <foundation/Error.h>
#include "conversion_export.h"


class QByteArray;
class QString;

namespace drn
{
namespace conversion
{

/**
 * @brief Represents an error during the conversion process with parsing the data.
 */
struct DRN_CONVERSION_EXPORT ParsingError : foundation::Error
{
	/**
	 * @brief Full initialisation constructor.
	 *
	 * @param data The data that contains the parsing error.
	 * @param error The extra details surrounding the parsing of the error.
	 * @param root Any root exception that triggered during the parsing.
	 */
	ParsingError(
		const QByteArray& data,
		const QString& error,
		const std::exception& root = {}
	);
	ParsingError(
		const QByteArray&,
		const char*,
		const std::exception& = {}
	) = delete;
};

}}

#endif
