Package AccessEngine :: Package AEDevice :: Package AEOutput :: Module AEOutputError
[hide private]
[frames] | no frames]

Source Code for Module AccessEngine.AEDevice.AEOutput.AEOutputError

 1  ''' 
 2  Defines a hierarchy of L{AEOutput} 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 AEOutputError(Exception):
21 ''' 22 Base class for all L{AEOutput} 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(AEOutputError):
28 ''' 29 Raised when an output device can not be initialized in some manner. 30 '''
31 - def __init__(self, *args, **kwargs):
32 AEOutputError.__init__(self, 33 _('could not initialize output device'), *args, **kwargs)
34
35 -class BrlttyError(AEOutputError):
36 ''' 37 Raised when brltty is not running 38 '''
39 - def __init__(self, *args, **kwargs):
40 AEOutputError.__init__(self, 41 _('BrlTTY is not running'), *args, **kwargs)
42