Skip to content

Commit d7ca0c8

Browse files
committed
print more about exceptions
1 parent 2680d4c commit d7ca0c8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

notebooks/tps/chatbot/chatbot-06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def send_request(self, _event):
169169
# display that message; it's only a token so we append it to the last message
170170
history.add_chunk(data['response'])
171171
except Exception as e:
172-
print("Error:", e)
172+
print(f"Exception {type(e)=}, {e=}")
173173
self.page.update()
174174

175175

notebooks/tps/chatbot/chatbot-07.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def send_request(self, _event):
178178
# display that message; it's only a token so we append it to the last message
179179
history.add_chunk(data['response'])
180180
except Exception as e:
181-
print("Error:", e)
181+
print(f"Exception {type(e)=}, {e=}")
182182
self.page.update()
183183

184184

notebooks/tps/chatbot/chatbot-08.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def send_request(self, _event):
177177
# display that message; it's only a token so we append it to the last message
178178
history.add_chunk(data['response'])
179179
except Exception as e:
180-
print("Error:", e)
180+
print(f"Exception {type(e)=}, {e=}")
181181
self.page.update()
182182
else:
183183
# streaming version
@@ -195,7 +195,7 @@ def send_request(self, _event):
195195
history.add_chunk(data['response'])
196196
self.page.update()
197197
except Exception as e:
198-
print("Error:", e)
198+
print(f"Exception {type(e)=}, {e=}")
199199

200200

201201
def main(page: ft.Page):

notebooks/tps/chatbot/chatbot-09.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def send_request(self, _event):
188188
# display that message; it's only a token so we append it to the last message
189189
history.add_chunk(data['response'])
190190
except Exception as e:
191-
print("Error:", e)
191+
print(f"Exception {type(e)=}, {e=}")
192192
self.page.update()
193193
else:
194194
# streaming version
@@ -206,7 +206,7 @@ def send_request(self, _event):
206206
history.add_chunk(data['response'])
207207
self.page.update()
208208
except Exception as e:
209-
print("Error:", e)
209+
print(f"Exception {type(e)=}, {e=}")
210210

211211

212212
def main(page: ft.Page):

notebooks/tps/chatbot/chatbot-10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def send_request(self, _event):
240240
history.add_chunk(data['response'])
241241
self.page.update()
242242
except Exception as e:
243-
print("Error:", e)
243+
print(f"Exception {type(e)=}, {e=}")
244244

245245

246246
def main(page: ft.Page):

0 commit comments

Comments
 (0)