Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
4470995b
Commit
4470995b
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
(swig) Catch exceptions raised by wcclfile
parent
a0fef117
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swig/libcclwcclfile.i
+107
-0
107 additions, 0 deletions
swig/libcclwcclfile.i
with
107 additions
and
0 deletions
swig/libcclwcclfile.i
+
107
−
0
View file @
4470995b
...
...
@@ -88,6 +88,14 @@ namespace Wccl {
/* --------------------------------------------------------------------- */
// const UntypedOpSequence& get_untyped_section(const std::string& name) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
UntypedOpSequence& get_untyped_section(const std::string& name);
/* --------------------------------------------------------------------- */
...
...
@@ -100,12 +108,38 @@ namespace Wccl {
%template(get_section_position) get_section<Position>;
%template(get_section_match) get_section<Match>;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<UntypedOpSequence> get_untyped_section_ptr(const std::string& name);
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<const UntypedOpSequence> get_untyped_section_ptr(const std::string& name) const;
/* --------------------------------------------------------------------- */
// template<class T> shared_ptr<const OpSequence<T> > get_section_ptr(const std::string& name) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
template<class T> shared_ptr<OpSequence<T> > get_section_ptr(const std::string& name);
%template(get_section_ptr_bool) get_section_ptr<Bool>;
%template(get_section_ptr_tset) get_section_ptr<TSet>;
...
...
@@ -116,11 +150,27 @@ namespace Wccl {
/* --------------------------------------------------------------------- */
// const FunctionalOperator& get_untyped_op(const std::string& name, size_t idx = 0) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
FunctionalOperator& get_untyped_op(const std::string& name, size_t idx = 0);
/* --------------------------------------------------------------------- */
// template<class T> const Operator<T>& get_op(const std::string& name, size_t idx = 0) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
template<class T> Operator<T>& get_op(const std::string& name, size_t idx = 0);
/*
%template(get_op_bool) get_op<Bool>;
...
...
@@ -133,11 +183,27 @@ namespace Wccl {
/* --------------------------------------------------------------------- */
// shared_ptr<const FunctionalOperator> get_untyped_op_ptr(const std::string& name, size_t idx = 0) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<FunctionalOperator> get_untyped_op_ptr(const std::string& name, size_t idx = 0);
/* --------------------------------------------------------------------- */
// template<class T> shared_ptr<const Operator<T> > get_op_ptr(const std::string& name, size_t idx = 0) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
template<class T> shared_ptr<Operator<T> > get_op_ptr(const std::string& name, size_t idx = 0);
%template(get_op_ptr_bool) get_op_ptr<Bool>;
%template(get_op_ptr_tset) get_op_ptr<TSet>;
...
...
@@ -148,11 +214,27 @@ namespace Wccl {
/* --------------------------------------------------------------------- */
// UntypedOpSequence::name_op_v_c_t gen_name_untyped_op_pairs() const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
UntypedOpSequence::name_op_v_t gen_name_untyped_op_pairs();
/* --------------------------------------------------------------------- */
// template<class T> typename OpSequence<T>::name_op_v_c_t gen_name_op_pairs() const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
template<class T> typename OpSequence<T>::name_op_v_t gen_name_op_pairs();
%template(gen_name_op_pairs_bool) gen_name_op_pairs<Bool>;
%template(gen_name_op_pairs_tset) gen_name_op_pairs<TSet>;
...
...
@@ -163,6 +245,14 @@ namespace Wccl {
/* --------------------------------------------------------------------- */
// FunctionalOpSequence::name_op_v_c_t gen_all_op_pairs() const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
FunctionalOpSequence::name_op_v_t gen_all_op_pairs();
...
...
@@ -173,7 +263,24 @@ namespace Wccl {
bool has_lexicon(const std::string& name) const;
bool has_lexicons() const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<const Lexicon> get_lexicon_ptr(const std::string& name) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
const Lexicon& get_lexicon(const std::string& name) const;
shared_ptr<const Lexicons> get_lexicons_ptr() const;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment