summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r--src/pyinterp.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index 0a56049c..0701176f 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -296,6 +296,10 @@ value_t python_interpreter_t::python_command(call_scope_t& args)
try {
status = Py_Main(static_cast<int>(args.size()) + 1, argv);
}
+ catch (const error_already_set&) {
+ PyErr_Print();
+ throw_(std::runtime_error, _("Failed to execute Python module"));
+ }
catch (...) {
for (std::size_t i = 0; i < args.size() + 1; i++)
delete[] argv[i];