-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathFCM_Exceptions.py
42 lines (22 loc) · 1.05 KB
/
FCM_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
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 31 22:19:01 2016
@author: Eric
"""
class FCMConstructionError(Exception) :
def __init__(self,message,errors) :
message=message+" : "+str(errors)
super(Exception, self).__init__(message)
class InvalidWeightError(FCMConstructionError) :
def __init__(self,errors,message="Invalid weight for an edge ") :
super(InvalidWeightError,self).__init__(message,errors)
class ConceptExistError(FCMConstructionError) :
def __init__(self,errors,message="Concept does not exist ") :
super(ConceptExistError,self).__init__(message,errors)
class EdgeExistError(FCMConstructionError) :
def __init__(self,errors,message="Edge does not exist between ") :
e=str(errors[0])+" - "+str(errors[1])
super(EdgeExistError,self).__init__(message,e)
class InvalidConceptValueError(FCMConstructionError) :
def __init__(self,errors,message="Invalid Concept value ") :
super(InvalidConceptValueError,self).__init__(message,errors)