Skip to content

Commit

Permalink
[_204] Naive impl of unknown string type handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinFlores751 committed Jun 12, 2024
1 parent ba6bb20 commit f034b41
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,17 @@ static irods::error exec_rule(const irods::default_re_ctx&,
const auto rei = get_rei_from_effect_handler(effect_handler);
bp::list rule_arguments_python{};
for (auto& cpp_argument : rule_arguments_cpp) {
rule_arguments_python.append(object_from_any(cpp_argument));
try {
rule_arguments_python.append(object_from_any(cpp_argument));
}
catch (const bp::error_already_set&) {
// Assume all Unicode Decoding Issues are related to irods/PREP#204
if (!PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) {
throw;
}
PyErr_Clear();
rule_arguments_python.append(boost::python::object{});
}
}

const bp::object ec = rule_function(rule_arguments_python, CallbackWrapper{effect_handler}, rei);
Expand Down

0 comments on commit f034b41

Please sign in to comment.