speciesgen/include/error.h

52 lines
1.5 KiB
C++

/*
speciesgen
Copyright (C) 2022-2023 prisixia
This file is part of speciesgen.
speciesgen is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
speciesgen 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
*/
/////////////////////////////////////////////////////////////////////////////
// Name: error.cpp
// Purpose: Implementation of ErrorHandler
// Author: prisixia
// Created: 2022-10-13
// Copyright: (C) 2022-2023 prisixia
// Licence: GNU General Public License version 3
/////////////////////////////////////////////////////////////////////////////
#ifndef SPECIESGEN_ERROR_H
#define SPECIESGEN_ERROR_H
#include <memory>
#include <string>
#include <vector>
namespace SpeciesGen {
class ErrorHandler {
public:
ErrorHandler(std::string = "ErrorHandler");
virtual size_t CheckForErrors() = 0;
virtual std::string GetError(const size_t);
virtual void ClearErrors();
protected:
std::string m_handlerName;
std::vector<std::string> m_errorLog;
};
} // namespace SpeciesGen
#endif // SPECIESGEN_ERROR_H