FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTExcelExceptionHandler.h
Go to the documentation of this file.
1#ifndef FMTEXCELEXCEPTIONHANDLER_Hm_included
2#define FMTEXCELEXCEPTIONHANDLER_Hm_included
3
5#include <unordered_map>
6#include <vector>
7#include <string>
8#include <memory>
9
10
11namespace Exception
12{
13 // DocString: FMTExcelExceptionHandler
18 {
19 public:
20 // DocString: FMTExcelExceptionHandler::getBuildExceptions
25 std::unordered_map<int, std::vector<std::string>> getBuildExceptions() const;
26 // DocString: FMTExcelExceptionHandler::resetBuildExceptions
31 // DocString: FMTExcelExceptionHandler::raise
43 virtual FMTException raise(FMTexc lexception, std::string text,
44 const std::string& method, const int& line, const std::string& file,
45 Core::FMTsection lsection = Core::FMTsection::Empty, bool throwit = true);
46 // DocString: FMTExcelExceptionHandler()
51 // DocString: FMTExcelExceptionHandler::clone
56 virtual std::unique_ptr <FMTExceptionHandler> clone() const;
57 private:
58 std::unordered_map<int, std::vector<std::string>>m_build_exceptions;
59 };
60
61}
62
63#endif
#define FMTEXPORT
Definition: FMTutility.h:125
Exception handler used by the Excel add-in that accumulates build exceptions instead of throwing.
Definition: FMTExcelExceptionHandler.h:18
std::unordered_map< int, std::vector< std::string > > getBuildExceptions() const
Return the build exceptions accumulated by the handler.
FMTExcelExceptionHandler()
Default constructor for FMTExcelExceptionHandler.
virtual FMTException raise(FMTexc lexception, std::string text, const std::string &method, const int &line, const std::string &file, Core::FMTsection lsection=Core::FMTsection::Empty, bool throwit=true)
Override the base class raise function to accumulate build exceptions. See FMTExceptionHandler::raise...
void resetBuildExceptions()
Clear the accumulated build exceptions.
virtual std::unique_ptr< FMTExceptionHandler > clone() const
clone the FMTExcelExceptionHandler.
Base class used to handle errors thrown in FMT.
Definition: FMTExceptionHandler.h:34
Base exception class for FMT holding the type, section and message of a given exception.
Definition: FMTException.h:140
FMTsection
Enumerator describing the sections of a Woodstock model.
Definition: FMTutility.h:32
@ Empty
Definition: FMTutility.h:44
Namespace for exceptions and exceptions handling (warnings and errors) thrown by FMT and all exceptio...
Definition: FMTAggregateRedefinition.h:11
FMTexc
Enumerator describing the exceptions thrown by FMT.
Definition: FMTException.h:45