8#ifndef PYEXPORTEXCEPTIONS_H_INCLUDED
9#define PYEXPORTEXCEPTIONS_H_INCLUDED
16#include "boost/python.hpp"
23 namespace bp = boost::python;
24 bp::object ExceptionModule(bp::handle<>(bp::borrowed(PyImport_AddModule(
"FMT.Exception"))));
25 bp::scope().attr(
"Exception") = ExceptionModule;
26 bp::scope Exception_scope = ExceptionModule;
27 bp::scope().attr(
"__doc__") =
".. module:: Exception\n"
29 " :platform: Unix, Windows\n"
30 " :synopsis: Module used to handel exceptions.\n"
33 bp::class_<Exception::FMTexceptionhandler>(
"FMTexceptionhandler",
"@DocString(FMTexceptionhandler)");
35 bp::class_<Exception::FMTdefaultexceptionhandler, bp::bases<Exception::FMTexceptionhandler>>(
"FMTdefaultexceptionhandler",
"@DocString(FMTdefaultexceptionhandler)")
37 "@DocString(FMTdefaultexceptionhandler::raise)");
39 bp::class_<Exception::FMTquietexceptionhandler, bp::bases<Exception::FMTexceptionhandler>>(
"FMTquietexceptionhandler",
"@DocString(FMTquietexceptionhandler)")
41 "@DocString(FMTquietexceptionhandler::raise)");
43 bp::class_<Exception::FMTdebugexceptionhandler, bp::bases<Exception::FMTexceptionhandler>>(
"FMTdebugexceptionhandler",
"@DocString(FMTdebugexceptionhandler)")
45 "@DocString(FMTdebugexceptionhandler::raise)");
48 bp::enum_<Exception::FMTexc>(
"FMTexc")
69 define_pylist<Exception::FMTexc>();
71 bp::class_<Exception::FMTexception>Exceptionclass(
"FMTexception",
"@DocString(FMTexception)");
73 "@DocString(FMTexception::gettype)");
75 "@DocString(FMTexception::getsection)");
77 "@DocString(FMTexception::what)");
79 bp::class_<Exception::FMTerror, bp::bases<Exception::FMTexception>>Errorclass(
"FMTerror",
"@DocString(FMTerror)");
80 bp::class_<Exception::FMTwarning, bp::bases<Exception::FMTexception>>(
"FMTwarning",
"@DocString(FMTwarning)");
82 bp::register_exception_translator<Exception::FMTwarning>(&FMTtranslate_warning);
83 FMTexceptiontype = Errorclass.ptr();
84 bp::register_exception_translator<Exception::FMTerror>(&FMTtranslate_error);
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
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
Core::FMTsection getsection() const
const char * what() const override
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
@ FMTundefined_action
Definition: FMTexception.hpp:74
@ FMTsame_transitiontargets
Definition: FMTexception.hpp:122
@ FMTinvalid_yield
Definition: FMTexception.hpp:50
@ FMTdeathwithlock
Definition: FMTexception.hpp:118
@ FMTinvalid_maskrange
Definition: FMTexception.hpp:49
@ FMTsourcetotarget_transition
Definition: FMTexception.hpp:121
@ FMToutput_missing_operator
Definition: FMTexception.hpp:105
@ FMTunsupported_yield
Definition: FMTexception.hpp:65
@ FMToutput_too_much_operator
Definition: FMTexception.hpp:106
@ FMTmissingyield
Definition: FMTexception.hpp:84
@ FMTundefined_attribute
Definition: FMTexception.hpp:61
@ FMTinvalid_number
Definition: FMTexception.hpp:54
@ FMTundefined_output
Definition: FMTexception.hpp:76
@ FMTinvalid_geometry
Definition: FMTexception.hpp:109
@ FMTundefinedoutput_attribute
Definition: FMTexception.hpp:110
@ FMTundefined_constant
Definition: FMTexception.hpp:86
@ FMTinvalidyield_number
Definition: FMTexception.hpp:107
@ FMToveridedyield
Definition: FMTexception.hpp:116
Definition: PYdefinitions.hpp:14
void exportException()
Definition: PYexportExceptions.hpp:21