Package xmlschema_acue :: Module exceptions

Source Code for Module xmlschema_acue.exceptions

 1  # -*- coding: utf-8 -*- 
 2  # 
 3  # Copyright (c), 2016-2019, SISSA (International School for Advanced Studies). 
 4  # All rights reserved. 
 5  # This file is distributed under the terms of the MIT License. 
 6  # See the file 'LICENSE' in the root directory of the present 
 7  # distribution, or http://opensource.org/licenses/MIT. 
 8  # 
 9  # @author Davide Brunato <brunato@sissa.it> 
10  # 
11  """ 
12  This module contains the exception and warning classes of the 'xmlschema_acue' package. 
13  """ 
14  from xmlschema_acue.compat import URLError 
15   
16   
17 -class XMLSchemaException(Exception):
18 """The base exception that let you catch all the errors generated by the library."""
19 20
21 -class XMLSchemaOSError(XMLSchemaException, OSError):
22 pass
23 24
25 -class XMLSchemaAttributeError(XMLSchemaException, AttributeError):
26 pass
27 28
29 -class XMLSchemaTypeError(XMLSchemaException, TypeError):
30 pass
31 32
33 -class XMLSchemaValueError(XMLSchemaException, ValueError):
34 pass
35 36
37 -class XMLSchemaSyntaxError(XMLSchemaException, SyntaxError):
38 pass
39 40
41 -class XMLSchemaKeyError(XMLSchemaException, KeyError):
42 pass
43 44
45 -class XMLSchemaIndexError(XMLSchemaException, ImportError):
46 pass
47 48
49 -class XMLSchemaURLError(XMLSchemaException, URLError):
50 pass
51 52
53 -class XMLSchemaRegexError(XMLSchemaException, ValueError):
54 """Raised when an error is found when parsing an XML Schema regular expression."""
55 56
57 -class XMLSchemaWarning(Warning):
58 """Base warning class for the XMLSchema package."""
59