forked from Gzuwkj/fuping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.py
28 lines (24 loc) · 1013 Bytes
/
error.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
from typing import List
from model import DictRecord
class Error(Exception):
no: str
msg: str
objectInfo: List[DictRecord] = None # (基础信息) 监测对象信息
huInfo: List[DictRecord] = None # (乡村建设) 户信息
outInfo: List[DictRecord] = None # (外出务工)
previewInfo: List[DictRecord] = None # (计划外出务工)
countryInfo: List[DictRecord] = None # (行政村)
def __init__(self, no: str, objectInfo: List[DictRecord] = None, huInfo: List[DictRecord] = None,
outInfo: List[DictRecord] = None,
previewInfo: List[DictRecord] = None,
countryInfo: List[DictRecord] = None,
msg: str = None) -> object:
self.no = no
self.msg = msg
self.objectInfo = objectInfo
self.huInfo = huInfo
self.outInfo = outInfo
self.previewInfo = previewInfo
self.countryInfo = countryInfo
def __str__(self):
return f'违反规则{self.no}'