Skip to content
Snippets Groups Projects
Commit ec1b1e22 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Handle for get_named_tagset exception

parent 21132f82
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,18 @@ namespace Corpus2 { ...@@ -41,6 +41,18 @@ namespace Corpus2 {
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
}; };
%exception {
try {
$action
} catch (Corpus2::TagsetNotFound &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
inline const Tagset& get_named_tagset(const std::string& name); inline const Tagset& get_named_tagset(const std::string& name);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment