Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3584 | sourcerer | 1 | /* |
2 | * This file is part of libdom. |
||
3 | * Licensed under the MIT License, |
||
4 | * http://www.opensource.org/licenses/mit-license.php |
||
5 | * Copyright 2007 John-Mark Bell |
||
6 | */ |
||
7 | |||
8 | #ifndef dom_core_exceptions_h_ |
||
9 | #define dom_core_exceptions_h_ |
||
10 | |||
11 | /** |
||
12 | * Class of a DOM exception. |
||
13 | * |
||
14 | * The top 16 bits of a dom_exception are a bitfield |
||
15 | * indicating which class the exception belongs to. |
||
16 | */ |
||
17 | typedef enum { |
||
18 | DOM_EXCEPTION_CLASS_NORMAL = 0, |
||
19 | DOM_EXCEPTION_CLASS_EVENT = (1<<30), |
||
20 | DOM_EXCEPTION_CLASS_INTERNAL = (1<<31) |
||
21 | } dom_exception_class; |
||
22 | |||
23 | /* The DOM spec says that this is actually an unsigned short */ |
||
24 | typedef enum { |
||
25 | DOM_NO_ERR = 0, |
||
26 | DOM_INDEX_SIZE_ERR = 1, |
||
27 | DOM_DOMSTRING_SIZE_ERR = 2, |
||
28 | DOM_HIERARCHY_REQUEST_ERR = 3, |
||
29 | DOM_WRONG_DOCUMENT_ERR = 4, |
||
30 | DOM_INVALID_CHARACTER_ERR = 5, |
||
31 | DOM_NO_DATA_ALLOWED_ERR = 6, |
||
32 | DOM_NO_MODIFICATION_ALLOWED_ERR = 7, |
||
33 | DOM_NOT_FOUND_ERR = 8, |
||
34 | DOM_NOT_SUPPORTED_ERR = 9, |
||
35 | DOM_INUSE_ATTRIBUTE_ERR = 10, |
||
36 | DOM_INVALID_STATE_ERR = 11, |
||
37 | DOM_SYNTAX_ERR = 12, |
||
38 | DOM_INVALID_MODIFICATION_ERR = 13, |
||
39 | DOM_NAMESPACE_ERR = 14, |
||
40 | DOM_INVALID_ACCESS_ERR = 15, |
||
41 | DOM_VALIDATION_ERR = 16, |
||
42 | DOM_TYPE_MISMATCH_ERR = 17, |
||
43 | |||
44 | DOM_UNSPECIFIED_EVENT_TYPE_ERR = DOM_EXCEPTION_CLASS_EVENT + 0, |
||
45 | DOM_DISPATCH_REQUEST_ERR = DOM_EXCEPTION_CLASS_EVENT + 1, |
||
46 | |||
47 | DOM_NO_MEM_ERR = DOM_EXCEPTION_CLASS_INTERNAL + 0, |
||
48 | DOM_ATTR_WRONG_TYPE_ERR = DOM_EXCEPTION_CLASS_INTERNAL + 1 |
||
49 | /* our own internal error */ |
||
50 | } dom_exception; |
||
51 | |||
52 | #endif31) |