szaszm commented on code in PR #2154:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2154#discussion_r3052576150
##########
extensions/python/PythonBindings.h:
##########
@@ -23,6 +23,14 @@
#include "types/Types.h"
+#define PYTHON_METHOD_BEGIN \
+ try {
+#define PYTHON_METHOD_END \
+ } catch (const std::exception& e) { \
+ PyErr_SetString(PyExc_Exception, e.what()); \
+ return nullptr; \
+ }
Review Comment:
I don't have a preference. This header can only be used in the python
extension code, so I'm not too worried about macro name collisions. Extensions
can include headers from other minifi modules, but other minifi modules can't
include headers from extensions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]