1
/* $Xorg: error.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */
2
/**** module error.h ****/
3
/******************************************************************************
5
Copyright 1993, 1994, 1998 The Open Group
7
Permission to use, copy, modify, distribute, and sell this software and its
8
documentation for any purpose is hereby granted without fee, provided that
9
the above copyright notice appear in all copies and that both that
10
copyright notice and this permission notice appear in supporting
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
Except as contained in this notice, the name of The Open Group shall not be
24
used in advertising or otherwise to promote the sale, use or other dealings
25
in this Software without prior written authorization from The Open Group.
30
This software is being provided by AGE Logic, Inc. under the
31
following license. By obtaining, using and/or copying this software,
32
you agree that you have read, understood, and will comply with these
35
Permission to use, copy, modify, distribute and sell this
36
software and its documentation for any purpose and without
37
fee or royalty and to grant others any or all rights granted
38
herein is hereby granted, provided that you agree to comply
39
with the following copyright notice and statements, including
40
the disclaimer, and that the same appears on all copies and
41
derivative works of the software and documentation you make.
43
"Copyright 1993, 1994 by AGE Logic, Inc."
45
THIS SOFTWARE IS PROVIDED "AS IS". AGE LOGIC MAKES NO
46
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. By way of
47
example, but not limitation, AGE LOGIC MAKE NO
48
REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS
49
FOR ANY PARTICULAR PURPOSE OR THAT THE SOFTWARE DOES NOT
50
INFRINGE THIRD-PARTY PROPRIETARY RIGHTS. AGE LOGIC
51
SHALL BEAR NO LIABILITY FOR ANY USE OF THIS SOFTWARE. IN NO
52
EVENT SHALL EITHER PARTY BE LIABLE FOR ANY INDIRECT,
53
INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS
54
OF PROFITS, REVENUE, DATA OR USE, INCURRED BY EITHER PARTY OR
55
ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT OR
56
BASED ON A WARRANTY, EVEN IF AGE LOGIC LICENSEES
57
HEREUNDER HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
60
The name of AGE Logic, Inc. may not be used in
61
advertising or publicity pertaining to this software without
62
specific, written prior permission from AGE Logic.
64
Title to this software shall at all times remain with AGE
66
*******************************************************************************
68
error.h -- error specific definitions
70
Robert NC Shelley -- AGE Logic, Inc. April, 1993
72
******************************************************************************/
73
/* $XFree86: xc/programs/Xserver/XIE/include/error.h,v 3.5 2001/12/14 19:58:13 dawes Exp $ */
80
#include <XIEproto.h> /* declares xieFloEvn */
81
#include <XIEprotost.h> /* declares xieTypPhototag */
82
#include <flostr.h> /* declares floDefPtr */
84
extern int SendFloError(ClientPtr client, floDefPtr flo);
85
extern int SendFloIDError(ClientPtr client, XID spaceID, XID floID);
86
extern int SendResourceError(ClientPtr client, CARD8 code, XID id);
87
extern void ErrDomain(floDefPtr flo, peDefPtr ped, xieTypPhototag domain);
88
extern void ErrGeneric(floDefPtr flo, peDefPtr ped, CARD8 code);
89
extern void ErrOperator(floDefPtr flo, peDefPtr ped, CARD8 operator);
90
extern void ErrResource(floDefPtr flo, peDefPtr ped, CARD8 code, CARD32 id);
91
extern void ErrTechnique(floDefPtr flo, peDefPtr ped, CARD8 group, CARD16 tech, CARD16 lenParams);
92
extern void ErrValue(floDefPtr flo, peDefPtr ped, CARD32 value);
93
extern void FloError(floDefPtr flo, xieTypPhototag tag, CARD16 type, CARD8 code);
96
* Convenience macros for dealing with the floDef generic error packet
98
#define ferrTag(flo) ((flo)->error.phototag)
99
#define ferrType(flo) ((flo)->error.type)
100
#define ferrCode(flo) ((flo)->error.floErrorCode)
101
#define ferrError(flo,tag,type,code) \
102
(ferrTag(flo)=(tag),ferrType(flo)=(type),ferrCode(flo)=(code))
105
* convenience macros for general flo errors
107
#define xieFloError(flo,tag,type,code) \
108
FloError(flo,(xieTypPhototag)tag,(CARD16)(long)type,(CARD8)code)
110
#define FloAccessError(flo,tag,type,xfer) \
111
{xieFloError(flo,tag,type,xieErrNoFloAccess); xfer;}
112
#define FloAllocError(flo,tag,type,xfer) \
113
{xieFloError(flo,tag,type,xieErrNoFloAlloc); xfer;}
114
#define FloElementError(flo,tag,type,xfer) \
115
{xieFloError(flo,tag,type,xieErrNoFloElement); xfer;}
116
#define FloImplementationError(flo,tag,type,xfer) \
117
{xieFloError(flo,tag,type,xieErrNoFloImplementation); xfer;}
118
#define FloLengthError(flo,tag,type,xfer) \
119
{xieFloError(flo,tag,type,xieErrNoFloLength); xfer;}
120
#define FloSourceError(flo,tag,type,xfer) \
121
{xieFloError(flo,tag,type,xieErrNoFloSource); xfer;}
124
* convenience macros for element-specific flo errors
126
#define AccessError(flo,ped,xfer) \
127
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloAccess); xfer;}
128
#define AllocError(flo,ped,xfer) \
129
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloAlloc); xfer;}
130
#define ColorListError(flo,ped,id,xfer) \
131
{ErrResource(flo,ped,(CARD8)xieErrNoFloColorList,id); xfer;}
132
#define ColormapError(flo,ped,id,xfer) \
133
{ErrResource(flo,ped,(CARD8)xieErrNoFloColormap,id); xfer;}
134
#define DomainError(flo,ped,dom,xfer) \
135
{ErrDomain(flo,ped,dom); xfer;}
136
#define DrawableError(flo,ped,id,xfer) \
137
{ErrResource(flo,ped,(CARD8)xieErrNoFloDrawable,id); xfer;}
138
#define ElementError(flo,ped,xfer) \
139
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloElement); xfer;}
140
#define GCError(flo,ped,id,xfer) \
141
{ErrResource(flo,ped,(CARD8)xieErrNoFloGC,id); xfer;}
142
#define ImplementationError(flo,ped,xfer) \
143
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloImplementation); xfer;}
144
#define LUTError(flo,ped,id,xfer) \
145
{ErrResource(flo,ped,(CARD8)xieErrNoFloLUT,id); xfer;}
146
#define MatchError(flo,ped,xfer) \
147
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloMatch); xfer;}
148
#define OperatorError(flo,ped,op,xfer) \
149
{ErrOperator(flo,ped,(CARD8)op); xfer;}
150
#define PhotomapError(flo,ped,id,xfer) \
151
{ErrResource(flo,ped,(CARD8)xieErrNoFloPhotomap,id); xfer;}
152
#define ROIError(flo,ped,id,xfer) \
153
{ErrResource(flo,ped,(CARD8)xieErrNoFloROI,id); xfer;}
154
#define SourceError(flo,ped,xfer) \
155
{ErrGeneric(flo,ped,(CARD8)xieErrNoFloSource); xfer;}
156
#define TechniqueError(flo,ped,group,tech,len,xfer) \
157
{ErrTechnique(flo,ped,(CARD8)group,(CARD16)tech,(CARD16)len); \
159
#define ValueError(flo,ped,value,xfer) \
160
{ErrValue(flo,ped,value); xfer;}
162
#endif /* end _XIEH_ERROR */