summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-14 20:43:28 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-14 20:43:28 -0500
commitbadbeb545b9e700e6656dfbc348bfe1387cb2ffa (patch)
tree26237a150367e13a24917d994602f5f94f979ec8 /src/pyinterp.cc
parent73baf9cd727407f6e47b410bbde3b4bcad482ae3 (diff)
parent8d698e5ccb471d546eee8a5bea6d6c56ec4b08c3 (diff)
downloadfork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.gz
fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.bz2
fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.zip
Merge branch 'next'
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];