Skip to content

Commit 4c6ed4a

Browse files
committed
Add bindings for exceptions.
1 parent 691a9a2 commit 4c6ed4a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/mobase/mobase.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include <tuple>
66
#include <variant>
77

8+
#include <uibase/exceptions.h>
9+
#include <uibase/versioning.h>
10+
811
#include <pybind11/embed.h>
912

1013
#include "pybind11_all.h"
@@ -24,6 +27,13 @@ PYBIND11_MODULE(mobase, m)
2427
m.add_object("PyQt6.QtGui", py::module_::import("PyQt6.QtGui"));
2528
m.add_object("PyQt6.QtWidgets", py::module_::import("PyQt6.QtWidgets"));
2629

30+
// exceptions
31+
//
32+
py::register_exception<Exception>(m, "Exception");
33+
py::register_exception<InvalidNXMLinkException>(m, "InvalidNXMLinkException");
34+
py::register_exception<IncompatibilityException>(m, "IncompatibilityException");
35+
py::register_exception<InvalidVersionException>(m, "InvalidVersionException");
36+
2737
// bindings
2838
//
2939
mo2::python::add_basic_bindings(m);

0 commit comments

Comments
 (0)