From 108a59bf7cad1845125cba7039767f479e48a943 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Thu, 1 Feb 2024 20:20:23 +0100 Subject: [PATCH] make inbox browser more robust against network errors Catch errors before they bubble up to the rendering engine. Thanks to @roberthirschfeld for the bug report! --- .../instance/conversationHelpAtRow.atColumn..st | 6 +++++- .../instance/conversationIconAtRow.atColumn..st | 3 ++- .../TalkInboxBrowser.class/methodProperties.json | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationHelpAtRow.atColumn..st b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationHelpAtRow.atColumn..st index 962afaaf..50d4f472 100644 --- a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationHelpAtRow.atColumn..st +++ b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationHelpAtRow.atColumn..st @@ -5,4 +5,8 @@ conversationHelpAtRow: rowIndex atColumn: columnIndex conversation := self conversations at: rowIndex ifAbsent: [^ nil]. conversation = #searching ifTrue: [^ nil]. - ^ self conversationHelpFor: conversation atColumnNamed: (self columnNameAt: columnIndex) \ No newline at end of file + ^ [self conversationHelpFor: conversation atColumnNamed: (self columnNameAt: columnIndex)] + on: Error , Warning , Halt do: [:ex | + '{1} {2}' asText format: + {(ToolIcons iconNamed: #exception) talkAsText. + ex description}] \ No newline at end of file diff --git a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationIconAtRow.atColumn..st b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationIconAtRow.atColumn..st index 58c024c4..9d64e8b9 100644 --- a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationIconAtRow.atColumn..st +++ b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/instance/conversationIconAtRow.atColumn..st @@ -10,4 +10,5 @@ conversationIconAtRow: rowIndex atColumn: columnIndex conversation := self conversations at: rowIndex ifAbsent: [^ nil]. conversation = #searching ifTrue: [^ nil]. - ^ self conversationIconFor: conversation atColumnNamed: (self columnNameAt: columnIndex) \ No newline at end of file + ^ [self conversationIconFor: conversation atColumnNamed: (self columnNameAt: columnIndex)] + on: Error , Warning , Halt do: [:ex | ToolIcons iconNamed: #exception] \ No newline at end of file diff --git a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/methodProperties.json b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/methodProperties.json index 0bee3158..c99de787 100644 --- a/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/methodProperties.json +++ b/packages/SqueakInboxTalk.package/TalkInboxBrowser.class/methodProperties.json @@ -87,9 +87,9 @@ "contents" : "ct 7/3/2021 02:00", "contributeMenu:" : "ct 7/8/2021 13:32", "conversationColumns" : "ct 5/15/2023 19:37", - "conversationHelpAtRow:atColumn:" : "ct 7/20/2021 20:25", + "conversationHelpAtRow:atColumn:" : "ct 2/1/2024 20:11", "conversationHelpFor:atColumnNamed:" : "ct 7/20/2021 20:24", - "conversationIconAtRow:atColumn:" : "ct 7/20/2021 20:25", + "conversationIconAtRow:atColumn:" : "ct 2/1/2024 20:06", "conversationIconFor:atColumnNamed:" : "ct 7/20/2021 23:13", "conversationMenu:" : "ct 6/2/2023 19:44", "conversations" : "ct 7/2/2021 16:57",