Skip to content
Snippets Groups Projects
Commit 501c3c1c authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

wrapped exceptions in op.get_T

parent cf8168c5
Branches
No related merge requests found
...@@ -28,6 +28,15 @@ namespace Wccl { ...@@ -28,6 +28,15 @@ namespace Wccl {
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
template<class T> T& get(const std::string& var_name); template<class T> T& get(const std::string& var_name);
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
%template(get_bool) get<Bool>; %template(get_bool) get<Bool>;
%template(get_tset) get<TSet>; %template(get_tset) get<TSet>;
%template(get_strset) get<StrSet>; %template(get_strset) get<StrSet>;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment