File: camel-exception.xml

package info (click to toggle)
evolution-data-server 2.22.3-1.1%2Blenny2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 69,336 kB
  • ctags: 44,478
  • sloc: ansic: 341,205; xml: 65,790; tcl: 30,499; sh: 19,137; perl: 11,529; cpp: 8,264; java: 7,653; makefile: 6,871; awk: 1,338; yacc: 1,105; sed: 772; cs: 505; lex: 134; python: 30; asm: 14
file content (270 lines) | stat: -rw-r--r-- 14,335 bytes parent folder | download
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<refentry id="camel-camel-exception">
<refmeta>
<refentrytitle role="top_of_page" id="camel-camel-exception.top_of_page">camel-exception</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>camel-exception</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="camel-camel-exception.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
enum                <link linkend="ExceptionId">ExceptionId</link>;
struct              <link linkend="CamelException">CamelException</link>;
#define             <link linkend="CAMEL-EXCEPTION-INITIALISER:CAPS">CAMEL_EXCEPTION_INITIALISER</link>
<link linkend="CamelException">CamelException</link>*     <link linkend="camel-exception-new">camel_exception_new</link>                 (void);
<link linkend="void">void</link>                <link linkend="camel-exception-free">camel_exception_free</link>                (<link linkend="CamelException">CamelException</link> *ex);
<link linkend="void">void</link>                <link linkend="camel-exception-init">camel_exception_init</link>                (<link linkend="CamelException">CamelException</link> *ex);
<link linkend="void">void</link>                <link linkend="camel-exception-clear">camel_exception_clear</link>               (<link linkend="CamelException">CamelException</link> *ex);
<link linkend="void">void</link>                <link linkend="camel-exception-set">camel_exception_set</link>                 (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="ExceptionId">ExceptionId</link> id,
                                                         const <link linkend="char">char</link> *desc);
<link linkend="void">void</link>                <link linkend="camel-exception-setv">camel_exception_setv</link>                (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="ExceptionId">ExceptionId</link> id,
                                                         const <link linkend="char">char</link> *format,
                                                         ...);
<link linkend="void">void</link>                <link linkend="camel-exception-xfer">camel_exception_xfer</link>                (<link linkend="CamelException">CamelException</link> *ex_dst,
                                                         <link linkend="CamelException">CamelException</link> *ex_src);
<link linkend="ExceptionId">ExceptionId</link>         <link linkend="camel-exception-get-id">camel_exception_get_id</link>              (<link linkend="CamelException">CamelException</link> *ex);
const <link linkend="char">char</link>*         <link linkend="camel-exception-get-description">camel_exception_get_description</link>     (<link linkend="CamelException">CamelException</link> *ex);
#define             <link linkend="camel-exception-is-set">camel_exception_is_set</link>              (ex)
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-camel-exception.description" role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="camel-camel-exception.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="ExceptionId" role="enum">
<title>enum ExceptionId</title>
<indexterm zone="ExceptionId"><primary>ExceptionId</primary></indexterm><programlisting>typedef enum {
#include "camel-exception-list.def"

} ExceptionId;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CamelException" role="struct">
<title>struct CamelException</title>
<indexterm zone="CamelException"><primary>CamelException</primary></indexterm><programlisting>struct CamelException {
	/* do not access the fields directly */
	ExceptionId id;
	char *desc;
};
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CAMEL-EXCEPTION-INITIALISER:CAPS" role="macro">
<title>CAMEL_EXCEPTION_INITIALISER</title>
<indexterm zone="CAMEL-EXCEPTION-INITIALISER:CAPS"><primary>CAMEL_EXCEPTION_INITIALISER</primary></indexterm><programlisting>#define CAMEL_EXCEPTION_INITIALISER { 0, NULL }
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-exception-new" role="function">
<title>camel_exception_new ()</title>
<indexterm zone="camel-exception-new"><primary>camel_exception_new</primary></indexterm><programlisting><link linkend="CamelException">CamelException</link>*     camel_exception_new                 (void);</programlisting>
<para>
Create and returns a new exception object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the newly allocated exception object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-free" role="function">
<title>camel_exception_free ()</title>
<indexterm zone="camel-exception-free"><primary>camel_exception_free</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_free                (<link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>
Free an exception object. If the exception is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, nothing is
done, the routine simply returns.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-init" role="function">
<title>camel_exception_init ()</title>
<indexterm zone="camel-exception-init"><primary>camel_exception_init</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_init                (<link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>
Init an exception. This routine is mainly useful when using a
statically allocated exception.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-clear" role="function">
<title>camel_exception_clear ()</title>
<indexterm zone="camel-exception-clear"><primary>camel_exception_clear</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_clear               (<link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>
Clear an exception, that is, set the exception ID to
<link linkend="CAMEL-EXCEPTION-NONE:CAPS"><type>CAMEL_EXCEPTION_NONE</type></link> and free the description text.  If the
exception is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, this funtion just returns.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-set" role="function">
<title>camel_exception_set ()</title>
<indexterm zone="camel-exception-set"><primary>camel_exception_set</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_set                 (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="ExceptionId">ExceptionId</link> id,
                                                         const <link linkend="char">char</link> *desc);</programlisting>
<para>
Set the value of an exception. The exception id is
a unique number representing the exception. The
textual description is a small text explaining
what happened and provoked the exception.
</para>
<para>
When <parameter>ex</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, nothing is done, this routine
simply returns.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> exception id
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> textual description of the exception
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-setv" role="function">
<title>camel_exception_setv ()</title>
<indexterm zone="camel-exception-setv"><primary>camel_exception_setv</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_setv                (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="ExceptionId">ExceptionId</link> id,
                                                         const <link linkend="char">char</link> *format,
                                                         ...);</programlisting>
<para>
Set the value of an exception. The exception id is
a unique number representing the exception. The
textual description is a small text explaining
what happened and provoked the exception.
In this version, the string is created from the format
string and the variable argument list.
</para>
<para>
It is safe to say:
  camel_exception_setv (ex, ..., camel_exception_get_description (ex), ...);
</para>
<para>
When <parameter>ex</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, nothing is done, this routine
simply returns.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> exception id
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara> format of the description string. The format string is
used as in <link linkend="printf"><function>printf()</function></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-xfer" role="function">
<title>camel_exception_xfer ()</title>
<indexterm zone="camel-exception-xfer"><primary>camel_exception_xfer</primary></indexterm><programlisting><link linkend="void">void</link>                camel_exception_xfer                (<link linkend="CamelException">CamelException</link> *ex_dst,
                                                         <link linkend="CamelException">CamelException</link> *ex_src);</programlisting>
<para>
Transfer the content of an exception from an exception object to
another.  The destination exception receives the id and the
description text of the source exception.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex_dst</parameter>&nbsp;:</term>
<listitem><simpara> Destination exception object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ex_src</parameter>&nbsp;:</term>
<listitem><simpara> Source exception object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-get-id" role="function">
<title>camel_exception_get_id ()</title>
<indexterm zone="camel-exception-get-id"><primary>camel_exception_get_id</primary></indexterm><programlisting><link linkend="ExceptionId">ExceptionId</link>         camel_exception_get_id              (<link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>
Get the id of an exception.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the exception id (<link linkend="CAMEL-EXCEPTION-NONE:CAPS"><type>CAMEL_EXCEPTION_NONE</type></link> will be returned if
<parameter>ex</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link> or unset)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-get-description" role="function">
<title>camel_exception_get_description ()</title>
<indexterm zone="camel-exception-get-description"><primary>camel_exception_get_description</primary></indexterm><programlisting>const <link linkend="char">char</link>*         camel_exception_get_description     (<link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>
Get the exception description text.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelException"><type>CamelException</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the exception description text (<link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned if
<parameter>ex</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link> or unset)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-exception-is-set" role="macro">
<title>camel_exception_is_set()</title>
<indexterm zone="camel-exception-is-set"><primary>camel_exception_is_set</primary></indexterm><programlisting>#define camel_exception_is_set(ex) (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>