Package AccessEngine :: Package AEDevice :: Package AEInput :: Module AEInputError
[hide private]
[frames] | no frames]

Source Code for Module AccessEngine.AEDevice.AEInput.AEInputError

 1  ''' 
 2  Defines a hierarchy of L{AEInput} exceptions that are raised when some device 
 3  operation fails. A hierarchy of exceptions is used rather than a single  
 4  exception with various error codes to support the catching of a particular  
 5  subtree of the hierarchy, a single kind of exception, or all exceptions. 
 6   
 7  @author: Peter Parente 
 8  @organization: IBM Corporation 
 9  @copyright: Copyright (c) 2005, 2007 IBM Corporation 
10  @license: The BSD License 
11   
12  All rights reserved. This program and the accompanying materials are made  
13  available under the terms of the BSD license which accompanies 
14  this distribution, and is available at 
15  U{http://www.opensource.org/licenses/bsd-license.php} 
16  ''' 
17   
18  from Tools.i18n import _ 
19   
20 -class AEInputError(Exception):
21 ''' 22 Base class for all L{AEInput} related errors. All arguments are simply passed 23 to the Exception base class, including any error code or message. 24 ''' 25 pass
26
27 -class InitError(AEInputError):
28 ''' 29 Raised when an input device can not be initialized in some manner. 30 '''
31 - def __init__(self, *args, **kwargs):
32 AEInputError.__init__(self, 33 _('could not initialize input device'), *args, **kwargs)
34