speciesgen/include/error.h

52 lines
1.5 KiB
C
Raw Normal View History

2023-03-27 13:36:18 +00:00
/*
speciesgen
2023-04-26 12:42:24 +00:00
Copyright (C) 2022-2023 prisixia
2023-03-27 13:36:18 +00:00
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
2023-04-26 12:42:24 +00:00
// Copyright: (C) 2022-2023 prisixia
// Licence: GNU General Public License version 3
2023-03-27 13:36:18 +00:00
/////////////////////////////////////////////////////////////////////////////
#ifndef SPECIESGEN_ERROR_H
#define SPECIESGEN_ERROR_H
#include <memory>
#include <string>
#include <vector>
namespace SpeciesGen {
class ErrorHandler {
public:
2023-05-05 18:29:32 +00:00
ErrorHandler(std::string = "ErrorHandler");
2023-03-27 13:36:18 +00:00
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