FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
RexportExceptions.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef REXPORTEXCEPTIONS_H_INCLUDED
9#define REXPORTEXCEPTIONS_H_INCLUDED
10
15#include <Rcpp.h>
16#include "Rdefinitions.hpp"
17#include "FMTerror.hpp"
18#include "FMTwarning.hpp"
19
20
39
40namespace R
41{
42
44 {
45
46 Rcpp::class_<Exception::FMTexceptionhandler>("FMTexceptionhandler", "@DocString(FMTexceptionhandler)")
47 .constructor("@DocString(FMTexceptionhandler())");
48
49
50 Rcpp::class_<Exception::FMTdefaultexceptionhandler>("FMTdefaultexceptionhandler", "@DocString(FMTdefaultexceptionhandler)")
51 .derives<Exception::FMTexceptionhandler>("FMTexceptionhandler")
52 .constructor("@DocString(FMTdefaultexceptionhandler())")
54 "@DocString(FMTdefaultexceptionhandler::raise)");
55
56
57 Rcpp::class_<Exception::FMTquietexceptionhandler>("FMTquietexceptionhandler", "@DocString(FMTquietexceptionhandler)")
58 .derives<Exception::FMTexceptionhandler>("FMTexceptionhandler")
59 .constructor("@DocString(FMTquietexceptionhandler())")
61 "@DocString(FMTquietexceptionhandler::raise)");
62
63
64 Rcpp::class_<Exception::FMTdebugexceptionhandler>("FMTdebugexceptionhandler", "@DocString(FMTdebugexceptionhandler)")
65 .derives<Exception::FMTexceptionhandler>("FMTexceptionhandler")
66 .constructor("@DocString(FMTdebugexceptionhandler())")
68 "@DocString(FMTdebugexceptionhandler::raise)");
69
70
71 Rcpp::class_<Exception::FMTexception>("FMTexception")
72 .constructor("@DocString(FMTdebugexceptionhandler())")
73 .method("gettype", &Exception::FMTexception::gettype,
74 "@DocString(FMTdebugexceptionhandler::gettype)")
75 .method("getsection", &Exception::FMTexception::getsection,
76 "@DocString(FMTdebugexceptionhandler::getsection)")
77 .method("what", &Exception::FMTexception::what,
78 "@DocString(FMTdebugexceptionhandler::what)");
79
80 Rcpp::class_<Exception::FMTerror>("FMTerror", "@DocString(FMTerror)")
81 .derives<Exception::FMTexception>("FMTexception")
82 .constructor("@DocString(FMTerror())");
83
84 Rcpp::class_<Exception::FMTwarning>("FMTwarning", "@DocString(FMTwarning)")
85 .derives<Exception::FMTexception>("FMTexception")
86 .constructor("@DocString(FMTwarning())");
87 }
88
89}
90
91#endif // PYEXPORTEXCEPTIONS_H_INCLUDED
RCPP_EXPOSED_WRAP(Exception::FMTexceptionhandler)
RCPP_EXPOSED_AS(Exception::FMTexceptionhandler)
RCPP_DEFINEVECTOR(Exception::FMTexc)
RCPP_EXPOSED_ENUM_NODECL(Exception::FMTexc)
Definition: FMTdebugexceptionhandler.hpp:22
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
Definition: FMTdefaultexceptionhandler.hpp:23
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
Definition: FMTerror.hpp:32
Definition: FMTexception.hpp:134
Core::FMTsection getsection() const
const char * what() const override
FMTexc gettype() const
Definition: FMTexceptionhandler.hpp:32
Definition: FMTquietexceptionhandler.hpp:23
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
Definition: FMTwarning.hpp:32
FMTsection
Definition: FMTutility.hpp:23
FMTexc
Definition: FMTexception.hpp:42
FMTlev
Definition: FMTexception.hpp:29
Definition: RexportCore.hpp:153
void exportException()
Definition: RexportExceptions.hpp:43