forked from microsoft/fabric-cicd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_exceptions.py
50 lines (31 loc) · 1004 Bytes
/
_exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""Custom exceptions for the fabric-cicd package."""
from logging import Logger
from typing import Optional
class BaseCustomError(Exception):
def __init__(self, message: str, logger: Logger, additional_info: Optional[str] = None) -> None:
"""
Initialize the BaseCustomError.
Args:
message: The error message.
logger: The logger instance.
additional_info: Additional information about the error.
"""
super().__init__(message)
self.logger = logger
self.additional_info = additional_info
class ParsingError(BaseCustomError):
pass
class InputError(BaseCustomError):
pass
class TokenError(BaseCustomError):
pass
class InvokeError(BaseCustomError):
pass
class ItemDependencyError(BaseCustomError):
pass
class FileTypeError(BaseCustomError):
pass
class ParameterFileError(BaseCustomError):
pass