Coverage for pyquickhelper/helpgen/helpgen_exceptions.py: 83%
12 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 02:21 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 02:21 +0200
1"""
2@file
3@brief Exception raised by the automated documentation
5"""
8class HelpGenException(Exception):
10 """
11 custom exception
12 """
14 def __init__(self, message, file=None):
15 """
16 redefines the message sent to an exception
18 @param message message
19 @param file filename
20 """
21 if file is None:
22 Exception.__init__(self, message)
23 else:
24 mes = f'{message}\n File "{file}", line 1'
25 Exception.__init__(self, mes)
28class ImportErrorHelpGen(ImportError):
30 """
31 A custom exception to detect a specific location when
32 *ImportError* happens in the process.
33 """
34 pass
37class HelpGenConvertError(Exception):
39 """
40 Exception raised when a conversion failed.
41 """
42 pass
45class NotebookConvertError(Exception):
47 """
48 Exception raised when a conversion failed.
49 """
50 pass