1CSS::DOM::Exception(3)User Contributed Perl DocumentationCSS::DOM::Exception(3)
2
3
4

NAME

6       CSS::DOM::Exception - The Exception interface for CSS::DOM
7

SYNOPSIS

9         use CSS::DOM::Exception 'SYNTAX_ERR';
10
11         eval {
12                 die new CSS::DOM::Exception
13                         SYNTAX_ERR,
14                         '1 is not a valid property declaration'
15         };
16
17         $@ == SYNTAX_ERR; # true
18
19         print $@;    # prints "1 is not a valid property declaration\n";
20

DESCRIPTION

22       This module implementations the W3C's DOMException interface.
23       CSS::DOM::Exception objects stringify to the message passed to the
24       constructer and numify to the error number (see below, under
25       'EXPORTS').
26

METHODS

28       new CSS::DOM::Exception $type, $message
29           This class method creates a new exception object. $type is expected
30           to be an integer (you can use the constants listed under
31           'EXPORTS').  $message is the error message.
32

EXPORTS

34       The following constants are optionally exported. The descriptions are
35       copied from the DOM spec.
36
37       INDEX_SIZE_ERR (1)
38           If index or size is negative, or greater than the allowed value
39
40       DOMSTRING_SIZE_ERR (2)
41           If the specified range of text does not fit into a DOMString
42
43       HIERARCHY_REQUEST_ERR (3)
44           If any node is inserted somewhere it doesn't belong
45
46       WRONG_DOCUMENT_ERR (4)
47           If a node is used in a different document than the one that created
48           it (that doesn't support it)
49
50       INVALID_CHARACTER_ERR (5)
51           If an invalid character is specified, such as in a name.
52
53       NO_DATA_ALLOWED_ERR (6)
54           If data is specified for a node which does not support data
55
56       NO_MODIFICATION_ALLOWED_ERR (7)
57           If an attempt is made to modify an object where modifications are
58           not allowed
59
60       NOT_FOUND_ERR (8)
61           If an attempt was made to reference a node in a context where it
62           does not exist
63
64       NOT_SUPPORTED_ERR (9)
65           If the implementation does not support the type of object requested
66
67       INUSE_ATTRIBUTE_ERR (10)
68           If an attempt is made to add an attribute that is already inuse
69           elsewhere
70
71       INVALID_STATE_ERR (11)
72           If an attempt is made to use an object that is not, or is no
73           longer, usable
74
75       SYNTAX_ERR (12)
76           If an invalid or illegal string is specified
77
78       INVALID_MODIFICATION_ERR (13)
79           If an attempt is made to modify the type of the underlying object
80
81       NAMESPACE_ERR (14)
82           If an attempt is made to create or change an object in a way which
83           is incorrect with regard to namespaces
84
85       INVALID_ACCESS_ERR (15)
86           If a parameter or an operation is not supported by the underlying
87           object
88

SEE ALSO

90       CSS::DOM, HTML::DOM::Exception
91
92
93
94perl v5.32.0                      2020-07-28            CSS::DOM::Exception(3)
Impressum