Bug 1551612 - Add componentDidCatch in Message component. r=bgrins.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Mon, 10 Jun 2019 06:22:05 +0000
changeset 11626 139923a4009f5dece86ff61b216d8b938fe90bb4
parent 11625 cee23b2524fb9d461a10f701059a6e714e231c6c
child 11627 dfd5a08ff564511a15dfaa64160a502e600832b3
push id146
push userflodolo@mozilla.com
push dateTue, 11 Jun 2019 06:10:01 +0000
reviewersbgrins
bugs1551612
Bug 1551612 - Add componentDidCatch in Message component. r=bgrins. This patch adds a componentDidCatch handler to the Message component so we don't crash the whole console when a message can't be rendered. When a message causes a crash, we display an error message instead, asking the user to file a bug. A button allow to copy the message data so it can be attached in the bug report. Differential Revision: https://phabricator.services.mozilla.com/D31195 X-Channel-Repo: mozilla-central X-Channel-Converted-Revision: 406aa9e6a10200d321e2d78cd0c2769c1f94fac3 X-Channel-Repo: releases/mozilla-beta X-Channel-Revision: 78928eb0791ef5074dab80bfeac2d96490d7267d X-Channel-Repo: releases/mozilla-release X-Channel-Revision: df853c362664989e025d1206b59c37c435186a91
devtools/client/webconsole.properties
--- a/devtools/client/webconsole.properties
+++ b/devtools/client/webconsole.properties
@@ -384,8 +384,18 @@ webconsole.confirmDialog.getter.invokeBu
 # Label used as the group header in the console output when content blocking is enabled
 # and that we have several warning messages about resources being blocked.
 webconsole.group.contentBlocked=Content blocked messages
 
 # LOCALIZATION NOTE (webconsole.cssWarningElements.label)
 # Label for the list of HTML elements matching the selector associated
 # with the CSS warning. Parameters: %S is the CSS selector.
 webconsole.cssWarningElements.label=Elements matching selector: %S
+
+# LOCALIZATION NOTE (webconsole.message.componentDidCatch.label)
+# Label displayed when the webconsole couldn't handle a given packet.
+# Parameters: %S is the URL to file a bug about the error.
+webconsole.message.componentDidCatch.label=[DEVTOOLS ERROR] We’re sorry, we couldn’t render the message. This shouldn’t have happened - please file a bug at %S with the message metadata in the description.
+
+# LOCALIZATION NOTE (webconsole.message.componentDidCatch.copyButton.label)
+# Label displayed on the button next to the message we display when the webconsole
+# couldn't handle a given packet (See webconsole.message.componentDidCatch.label).
+webconsole.message.componentDidCatch.copyButton.label=Copy message metadata to clipboard
\ No newline at end of file