-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
30 lines (20 loc) · 846 Bytes
/
exceptions.py
File metadata and controls
30 lines (20 loc) · 846 Bytes
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
# (c) @Lookingforcommit
# TODO: Add exceptions classes for bot commands processing
from abc import abstractmethod
class ScenariosExecutionException(Exception):
@abstractmethod
def __init__(self):
pass
@abstractmethod
def __str__(self):
pass
class ScenarioException(ScenariosExecutionException):
def __init__(self, stage_number: int, scenario_name: str, exc: str):
self.error_message = f"Error executing scenario {scenario_name} for stage #{stage_number}: \n{exc}"
def __str__(self):
return self.error_message
class PreprocessCopyingException(ScenariosExecutionException):
def __init__(self, message_id: int, exc: str):
self.error_message = f"Error copying message {message_id} for scenarios execution: \n{exc}"
def __str__(self):
return self.error_message