File: except.i

package info (click to toggle)
xapian-bindings 1.4.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,436 kB
  • sloc: cpp: 379,853; python: 10,780; cs: 9,529; java: 6,949; sh: 4,629; perl: 4,435; makefile: 1,274; ruby: 1,028; php: 586; tcl: 246
file content (228 lines) | stat: -rw-r--r-- 11,945 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
%{
/** @file
 * @brief Custom PHP exception handling.
 */
/* Warning: This file is generated by ./generate-php-exceptions
 * - do not modify directly!
 *
 * Copyright 2006,2007,2010,2011,2012,2016 Olly Betts
 * Copyright 2007 Lemur Consulting Ltd
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 */

#include <exception>
#include <zend_exceptions.h>

static void
XapianExceptionHandler()
{
    try {
	// Rethrow so we can look at the exception if it was a Xapian::Error.
	throw;
    } catch (const Xapian::Error &e) {
        // FIXME: It would be nicer to make the exceptions PHP classes
        // corresponding to the C++ Xapian::Error class hierarchy.
	zend_throw_exception(NULL, e.get_description().c_str(),
			     SWIG_UnknownError);
    } catch (const std::exception &e) {
	zend_throw_exception_ex(NULL, SWIG_UnknownError,
				"std::exception %s", e.what());
    } catch (...) {
	zend_throw_exception(NULL, "unknown error in Xapian",
			     SWIG_UnknownError);
    }
}
%}

/* Functions and methods which are marked as "nothrow": */
%exception Xapian::Compactor::~Compactor;
%exception Xapian::Compactor::get_constinfo_();
%exception Xapian::Database::~Database;
%exception Xapian::Database::postlist_end(const std::string &) const;
%exception Xapian::Database::termlist_end(Xapian::docid) const;
%exception Xapian::Database::positionlist_end(Xapian::docid, const std::string &) const;
%exception Xapian::Database::allterms_end(const std::string & = std::string()) const;
%exception Xapian::Database::valuestream_end(Xapian::valueno) const;
%exception Xapian::Database::spellings_end() const;
%exception Xapian::Database::synonyms_end(const std::string &) const;
%exception Xapian::Database::synonym_keys_end(const std::string & = std::string()) const;
%exception Xapian::Database::metadata_keys_end(const std::string & = std::string()) const;
%exception Xapian::WritableDatabase::~WritableDatabase;
%exception Xapian::Document::~Document;
%exception Xapian::Document::termlist_end() const;
%exception Xapian::Document::values_end() const;
%exception Xapian::RSet::~RSet;
%exception Xapian::MatchDecider::~MatchDecider;
%exception Xapian::Enquire::~Enquire;
%exception Xapian::Enquire::get_matching_terms_end(Xapian::docid  ) const;
%exception Xapian::Enquire::get_matching_terms_end(const MSetIterator & ) const;
%exception Xapian::Error::~Error;
%exception Xapian::Error::get_type() const;
%exception Xapian::Error::get_msg() const;
%exception Xapian::Error::get_context() const;
%exception Xapian::LogicError::~LogicError;
%exception Xapian::RuntimeError::~RuntimeError;
%exception Xapian::AssertionError::~AssertionError;
%exception Xapian::InvalidArgumentError::~InvalidArgumentError;
%exception Xapian::InvalidOperationError::~InvalidOperationError;
%exception Xapian::UnimplementedError::~UnimplementedError;
%exception Xapian::DatabaseError::~DatabaseError;
%exception Xapian::DatabaseCorruptError::~DatabaseCorruptError;
%exception Xapian::DatabaseCreateError::~DatabaseCreateError;
%exception Xapian::DatabaseLockError::~DatabaseLockError;
%exception Xapian::DatabaseModifiedError::~DatabaseModifiedError;
%exception Xapian::DatabaseOpeningError::~DatabaseOpeningError;
%exception Xapian::DatabaseVersionError::~DatabaseVersionError;
%exception Xapian::DocNotFoundError::~DocNotFoundError;
%exception Xapian::FeatureUnavailableError::~FeatureUnavailableError;
%exception Xapian::InternalError::~InternalError;
%exception Xapian::NetworkError::~NetworkError;
%exception Xapian::NetworkTimeoutError::~NetworkTimeoutError;
%exception Xapian::QueryParserError::~QueryParserError;
%exception Xapian::SerialisationError::~SerialisationError;
%exception Xapian::RangeError::~RangeError;
%exception Xapian::WildcardError::~WildcardError;
%exception Xapian::DatabaseNotFoundError::~DatabaseNotFoundError;
%exception Xapian::DatabaseClosedError::~DatabaseClosedError;
%exception Xapian::ErrorHandler::~ErrorHandler;
%exception Xapian::ErrorHandler::ErrorHandler();
%exception Xapian::ESet::~ESet;
%exception Xapian::ESetIterator::~ESetIterator;
%exception Xapian::ESetIterator::operator==(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ESetIterator::operator!=(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ESetIterator::operator<(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ESetIterator::operator>(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ESetIterator::operator>=(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ESetIterator::operator<=(const ESetIterator &a, const ESetIterator &b);
%exception Xapian::ExpandDecider::~ExpandDecider;
%exception Xapian::ExpandDeciderAnd::~ExpandDeciderAnd;
%exception Xapian::ExpandDeciderFilterTerms::~ExpandDeciderFilterTerms;
%exception Xapian::ExpandDeciderFilterPrefix::~ExpandDeciderFilterPrefix;
%exception Xapian::ExpandDeciderFilterPrefix::miles_to_metres(double miles);
%exception Xapian::ExpandDeciderFilterPrefix::metres_to_miles(double metres);
%exception Xapian::ExpandDeciderFilterPrefix::LatLongCoord();
%exception Xapian::ExpandDeciderFilterPrefix::operator<(const LatLongCoord & other) const;
%exception Xapian::LatLongCoordsIterator::~LatLongCoordsIterator;
%exception Xapian::LatLongCoords::~LatLongCoords;
%exception Xapian::LatLongMetric::~LatLongMetric;
%exception Xapian::GreatCircleMetric::~GreatCircleMetric;
%exception Xapian::LatLongDistancePostingSource::~LatLongDistancePostingSource;
%exception Xapian::LatLongDistanceKeyMaker::~LatLongDistanceKeyMaker;
%exception Xapian::opt_intrusive_base::~opt_intrusive_base;
%exception Xapian::KeyMaker::~KeyMaker;
%exception Xapian::MultiValueKeyMaker::~MultiValueKeyMaker;
%exception Xapian::MatchSpy::~MatchSpy;
%exception Xapian::MatchSpy::MatchSpy();
%exception Xapian::ValueCountMatchSpy::~ValueCountMatchSpy;
%exception Xapian::ValueCountMatchSpy::get_total() const;
%exception Xapian::ValueCountMatchSpy::values_end() const;
%exception Xapian::ValueCountMatchSpy::top_values_end(size_t) const;
%exception Xapian::MSet::~MSet;
%exception Xapian::MSetIterator::~MSetIterator;
%exception Xapian::MSetIterator::operator==(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::MSetIterator::operator!=(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::MSetIterator::operator<(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::MSetIterator::operator>(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::MSetIterator::operator>=(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::MSetIterator::operator<=(const MSetIterator &a, const MSetIterator &b);
%exception Xapian::PositionIterator::~PositionIterator;
%exception Xapian::PositionIterator::PositionIterator();
%exception Xapian::PositionIterator::operator==(const PositionIterator &a, const PositionIterator &b);
%exception Xapian::PositionIterator::operator!=(const PositionIterator &a, const PositionIterator &b);
%exception Xapian::PostingIterator::~PostingIterator;
%exception Xapian::PostingIterator::PostingIterator();
%exception Xapian::PostingIterator::positionlist_end() const;
%exception Xapian::PostingIterator::operator==(const PostingIterator &a, const PostingIterator &b);
%exception Xapian::PostingIterator::operator!=(const PostingIterator &a, const PostingIterator &b);
%exception Xapian::PostingSource::~PostingSource;
%exception Xapian::PostingSource::PostingSource();
%exception Xapian::PostingSource::get_maxweight() const;
%exception Xapian::ValuePostingSource::~ValuePostingSource;
%exception Xapian::ValueWeightPostingSource::~ValueWeightPostingSource;
%exception Xapian::DecreasingValueWeightPostingSource::~DecreasingValueWeightPostingSource;
%exception Xapian::ValueMapPostingSource::~ValueMapPostingSource;
%exception Xapian::FixedWeightPostingSource::~FixedWeightPostingSource;
%exception Xapian::Query::~Query;
%exception Xapian::Query::Query();
%exception Xapian::Query::get_terms_end() const;
%exception Xapian::Query::get_unique_terms_end() const;
%exception Xapian::Query::get_length() const;
%exception Xapian::Query::empty() const;
%exception Xapian::Query::get_type() const;
%exception Xapian::Query::get_num_subqueries() const;
%exception Xapian::Query::Internal();
%exception Xapian::Query::get_length() const;
%exception Xapian::Query::get_type() const;
%exception Xapian::Query::get_num_subqueries() const;
%exception Xapian::Stopper::~Stopper;
%exception Xapian::SimpleStopper::~SimpleStopper;
%exception Xapian::RangeProcessor::~RangeProcessor;
%exception Xapian::DateRangeProcessor::~DateRangeProcessor;
%exception Xapian::NumberRangeProcessor::~NumberRangeProcessor;
%exception Xapian::ValueRangeProcessor::~ValueRangeProcessor;
%exception Xapian::FieldProcessor::~FieldProcessor;
%exception Xapian::QueryParser::~QueryParser;
%exception Xapian::QueryParser::stoplist_end() const;
%exception Xapian::QueryParser::unstem_end(const std::string &) const;
%exception Xapian::QueryParser::sortable_serialise_(double value, char * buf);
%exception Xapian::QueryParser::sortable_unserialise(const std::string & serialised);
%exception Xapian::Registry::~Registry;
%exception Xapian::StemImplementation::~StemImplementation;
%exception Xapian::Stem::~Stem;
%exception Xapian::TermGenerator::~TermGenerator;
%exception Xapian::TermIterator::~TermIterator;
%exception Xapian::TermIterator::TermIterator();
%exception Xapian::TermIterator::positionlist_end() const;
%exception Xapian::TermIterator::operator==(const TermIterator &a, const TermIterator &b);
%exception Xapian::TermIterator::operator!=(const TermIterator &a, const TermIterator &b);
%exception Xapian::Utf8Iterator::~Utf8Iterator;
%exception Xapian::Utf8Iterator::calculate_sequence_length() const;
%exception Xapian::Utf8Iterator::Utf8Iterator();
%exception Xapian::Utf8Iterator::operator*() const;
%exception Xapian::Utf8Iterator::strict_deref() const;
%exception Xapian::Utf8Iterator::operator==(const Utf8Iterator& other) const;
%exception Xapian::Utf8Iterator::operator!=(const Utf8Iterator& other) const;
%exception Xapian::Utf8Iterator::get_character_info(unsigned ch);
%exception Xapian::ValueIterator::~ValueIterator;
%exception Xapian::ValueIterator::ValueIterator();
%exception Xapian::ValueIterator::operator==(const ValueIterator &a, const ValueIterator &b);
%exception Xapian::ValueIterator::operator!=(const ValueIterator &a, const ValueIterator &b);
%exception Xapian::ValueSetMatchDecider::~ValueSetMatchDecider;
%exception Xapian::Weight::~Weight;
%exception Xapian::BoolWeight::~BoolWeight;
%exception Xapian::TfIdfWeight::~TfIdfWeight;
%exception Xapian::BM25Weight::~BM25Weight;
%exception Xapian::BM25PlusWeight::~BM25PlusWeight;
%exception Xapian::TradWeight::~TradWeight;
%exception Xapian::InL2Weight::~InL2Weight;
%exception Xapian::IfB2Weight::~IfB2Weight;
%exception Xapian::IneB2Weight::~IneB2Weight;
%exception Xapian::BB2Weight::~BB2Weight;
%exception Xapian::DLHWeight::~DLHWeight;
%exception Xapian::PL2Weight::~PL2Weight;
%exception Xapian::PL2PlusWeight::~PL2PlusWeight;
%exception Xapian::DPHWeight::~DPHWeight;
%exception Xapian::LMWeight::~LMWeight;
%exception Xapian::CoordWeight::~CoordWeight;

%exception {
    try {
	$function
    } catch (...) {
	XapianExceptionHandler();
	return;
    }
}