File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,11 +63,31 @@ class FileException(Exception):
6363
6464
6565def main ():
66+ # asyncio.run(record_action())
67+
6668 try :
6769 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)
7191
7292
7393async def record_action ():
You can’t perform that action at this time.
0 commit comments