File tree 1 file changed +23
-3
lines changed 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,31 @@ class FileException(Exception):
63
63
64
64
65
65
def main ():
66
+ # asyncio.run(record_action())
67
+
66
68
try :
67
69
asyncio .run (record_action ())
68
- except Exception as x :
69
- print ("Error:" )
70
- print (x )
70
+ except* DbException as db :
71
+ for e in db .exceptions :
72
+ print (f"DbException: Error with DB: { e } " )
73
+ except* HttpException :
74
+ print ("HttpException: Error with API" )
75
+ except* FileException :
76
+ print ("FileException: Error with file!" )
77
+ except* Exception as x :
78
+ print (f"{ len (x .exceptions )} additional errors:" )
79
+ for e in x .exceptions :
80
+ print (f"Error: { e } " )
81
+
82
+
83
+ # def main():
84
+ # # asyncio.run(record_action())
85
+ #
86
+ # try:
87
+ # asyncio.run(record_action())
88
+ # except Exception as x:
89
+ # print("Error:")
90
+ # print(type(x).__name__, x)
71
91
72
92
73
93
async def record_action ():
You can’t perform that action at this time.
0 commit comments