1 '''
2 Defines a hierarchy of L{Task.Tools} exceptions that are raised in tools
3 methods. A hierarchy of exceptions is used rather than a single exception with
4 various error codes to support the catching of a particular subtree of the
5 hierarchy, a single kind of exception, or all exceptions.
6
7 @author: Peter Parente
8 @author: Scott Haeger
9 @organization: IBM Corporation
10 @copyright: Copyright (c) 2005, 2007 IBM Corporation
11 @license: The BSD License
12
13 All rights reserved. This program and the accompanying materials are made
14 available under the terms of the BSD license which accompanies
15 this distribution, and is available at
16 U{http://www.opensource.org/licenses/bsd-license.php}
17 '''
18 from i18n import _
19
21 '''
22 Special exception that stops execution of all L{Task}s registered to handle
23 the current L{AEEvent}. Once this exception is raised, L{Task}s left to
24 handle the event are updated rather than executed.
25 '''
26 pass
27
45
47 '''
48 Exception for a unknown reasons.
49 '''
50 description = _('unknown task error')
51
53 '''
54 Exception subtree for all device errors.
55 '''
56 description = _('device error')
57
59 '''
60 Exception for a request for an invalid device.
61 '''
62 description = _('invalid device')
63
65 '''
66 Exception for an invalid style.
67 '''
68 description = _('invalid style property')
69
71 '''
72 Exception for an undefined key constant failure.
73 '''
74 description = _('undefined key')
75
77 '''
78 Exception for an incomplete key command registration failure.
79 '''
80 description = _('cancelled key')
81
83 '''
84 Exception subtree for accessible action errors.
85 '''
86 description = _('action failed')
87
89 '''
90 Exception for failures setting the focus.
91 '''
92 description = _('set focus failed')
93
95 '''
96 Exception for failures setting the selection.
97 '''
98 description = _('set selection failed')
99
101 '''
102 Exception for mouse event failures.
103 '''
104 description = _('mouse event failed')
105
107 '''
108 Exception for failures setting the caret position.
109 '''
110 description = _('set caret failed')
111
112 -class TextError(ActionError):
113 '''
114 Exception for failures manipulating text.
115 '''
116 description = _('text action failed')
117
119 '''
120 Exception for L{POR} and related accessible failures.
121 '''
122 description = _('invalid point of regard')
123