From 1ac9b2068d84c6e47c842fffbb05f517a648e65d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl>
Date: Fri, 6 May 2011 11:18:34 +0200
Subject: [PATCH] Wrappers for Corpus2::TagParseError and
 Corpus2::TagsetMismatch

---
 swig/libcorpustagset.i | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/swig/libcorpustagset.i b/swig/libcorpustagset.i
index 8030f6c..4b469a6 100644
--- a/swig/libcorpustagset.i
+++ b/swig/libcorpustagset.i
@@ -7,6 +7,7 @@
 %}
 
 %include "libcorpustag.i"
+%include "libcorpus2exception.i"
 
 %include "std_string.i"
 %include "std_vector.i"
@@ -17,6 +18,36 @@
 %template(StdStringVector) std::vector<std::string>;
 
 namespace Corpus2 {
+  class Tagset;
+  class TagParseError : public Corpus2Error {
+  public:
+    TagParseError(const std::string &what, const std::string& val,
+        const std::string& tag, const std::string& tagset);
+
+    ~TagParseError() throw() {}
+
+    /* --------------------------------------------------------------------- */
+    std::string info() const;
+    std::string val, tag, tagset;
+  }; // TagParseError
+
+  class TagsetMismatch : public Corpus2Error {
+  public:
+    TagsetMismatch(const std::string& where, const Tagset& expected,
+        const Tagset& actual);
+
+    // TagsetMismatch(const std::string& where, tagset_idx_t expected,
+    //    tagset_idx_t actual);
+
+    ~TagsetMismatch() throw() {}
+
+    /* --------------------------------------------------------------------- */
+    std::string info() const;
+
+    /* --------------------------------------------------------------------- */
+    // tagset_idx_t expected_id, actual_id;
+  }; // TagsetMismatch
+
   class Tagset {
   public:
 
-- 
GitLab