-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.py
29 lines (21 loc) · 1013 Bytes
/
errors.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
from datetime import datetime
class MissingConfig(Exception):
def __init__(self,message,config_missing):
super().__init__(message)
with open("log.txt","a") as log:
log.write("["+datetime.now().strftime("%d/%m/%Y, %H:%M:%S")+"]ERROR MissingConfig: "+message)
class MissingGraphMethod(Exception):
def __init__(self,message,method_missing):
super().__init__(message)
with open("log.txt","a") as log:
log.write("["+datetime.now().strftime("%d/%m/%Y, %H:%M:%S")+"]ERROR MissingGraphMethod: "+message+"\n")
class MissingConfigFile(Exception):
def __init__(self,message):
super().__init__(message)
with open("log.txt","a") as log:
log.write("["+datetime.now().strftime("%d/%m/%Y, %H:%M:%S")+"]ERROR MissingConfigFile: "+message+"\n")
class MissingMethodFile(Exception):
def __init__(self,message):
super().__init__(message)
with open("log.txt","a") as log:
log.write("["+datetime.now().strftime("%d/%m/%Y, %H:%M:%S")+"]ERROR MissingMethodFile\n")