[sourcemaps] More detailed error reporting for failed SourceMap loads

This CL reports internal error numbers to the DevTools console. This is
immediatelly useful for early adopters. We'll add text messages if this
turns out to be useful.

Bug: chromium:1030746
Change-Id: Id4f84a1822e0e01268821d6b643dde4f5f437b3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958994
Commit-Queue: Sigurd Schneider <[email protected]>
Reviewed-by: Jan Scheffler <[email protected]>
Reviewed-by: Mathias Bynens <[email protected]>
diff --git a/front_end/sdk/sdk_strings.grdp b/front_end/sdk/sdk_strings.grdp
index f30bea1..bd00b6e 100644
--- a/front_end/sdk/sdk_strings.grdp
+++ b/front_end/sdk/sdk_strings.grdp
@@ -6,9 +6,6 @@
   <message name="IDS_DEVTOOLS_04608e209233c72a33b9a80e8ff2bd58" desc="Tooltip to explain why a cookie was blocked">
     This cookie had the &quot;SameSite=None&quot; attribute but was not marked &quot;Secure&quot;. Cookies without SameSite restrictions must be marked &quot;Secure&quot; and sent over a secure connection.
   </message>
-  <message name="IDS_DEVTOOLS_0568216cb82d1edfc0a9482db7b99ba1" desc="Error message when failing to load a script source text via the network">
-    Could not load content for <ph name="THIS__SOURCEURL"><ex>https://example.com</ex>$1s</ph> : HTTP status code: <ph name="STATUSCODE"><ex>404</ex>$2s</ph>
-  </message>
   <message name="IDS_DEVTOOLS_07553a11db31a4433684be32cc4716e3" desc="Text in Network Manager">
     Cross-Origin Read Blocking (CORB) blocked cross-origin response <ph name="NETWORKREQUEST_URL__">$1s<ex>https://example.com</ex></ph> with MIME type <ph name="NETWORKREQUEST_MIMETYPE">$2s<ex>application</ex></ph>. See https://www.chromestatus.com/feature/5629709824032768 for more details.
   </message>
@@ -84,6 +81,9 @@
   <message name="IDS_DEVTOOLS_5e53467e9b005376370c28e92b42b6f5" desc="Title of a setting under the Rendering drawer that can be invoked through the Command Menu">
     Emulate CSS prefers-reduced-motion: reduce
   </message>
+  <message name="IDS_DEVTOOLS_66c8faee22c98da5169a40a63299f993" desc="Error message when failing to load a source map text via the network">
+    Could not load content for <ph name="SOURCEMAPURL">$1s<ex>https://example.com</ex></ph><ph name="INTERNALERROR">$2s<ex> error code 15</ex></ph>
+  </message>
   <message name="IDS_DEVTOOLS_685c645cb0cb322c5b9989eb12bada19" desc="Title of a setting under the Rendering drawer that can be invoked through the Command Menu">
     Emulate CSS media feature prefers-color-scheme
   </message>
@@ -279,6 +279,9 @@
   <message name="IDS_DEVTOOLS_a1595abbb4c3a326636dd178757cd6c1" desc="Text in DOMDebugger Model">
     Control
   </message>
+  <message name="IDS_DEVTOOLS_a4fde38e56094c9fa87b2d9079dad5b4" desc="Error message when failing to load a source map text via the network">
+    ''' (HTTP status code: <ph name="STATUSCODE"><ex>404</ex>$1s</ph>, net error code <ph name="NETERROR"><ex>-202</ex>$2s</ph>)
+  </message>
   <message name="IDS_DEVTOOLS_a720fc15eb9ec85751969e8615ace9e1" desc="Text in Server Timing">
     Duplicate parameter &quot;<ph name="PARAMNAME">$1s<ex>https</ex></ph>&quot; ignored.
   </message>
@@ -333,6 +336,9 @@
   <message name="IDS_DEVTOOLS_c89686a387d2b12b3c729ce35a0bcb5b" desc="Text in DOMDebugger Model">
     Window
   </message>
+  <message name="IDS_DEVTOOLS_ca4fbb6d710463b20755b9a024d841c1" desc="Error message when failing to load a source map text">
+    DevTools failed to load SourceMap: <ph name="ERROR_MESSAGE"><ex>An error occured</ex>$1s</ph>
+  </message>
   <message name="IDS_DEVTOOLS_ccab918ce9f085b521a52ac13f653c0b" desc="Tooltip to explain why a cookie was blocked">
     An unknown error was encountered when trying to send this cookie.
   </message>
@@ -366,6 +372,9 @@
   <message name="IDS_DEVTOOLS_e2b60c37530e144372a7943df0f6017d" desc="Text in Resource Tree Model">
     &lt;iframe&gt;
   </message>
+  <message name="IDS_DEVTOOLS_e3f19fc256ab121cc63e22eb3a891b1a" desc="Error message when failing to load a script source text via the network">
+    Could not parse content for <ph name="SOURCEMAPURL"><ex>https://example.com</ex>$1s</ph>: <ph name="E_MESSAGE"><ex>Unexpected token</ex>$2s</ph>
+  </message>
   <message name="IDS_DEVTOOLS_e485c975c1d6c17d9dfd81128b83f63a" desc="Text in the Event Listener Breakpoints Panel of the JavaScript Debugger in the Sources Panel">
     Set innerHTML
   </message>
@@ -381,6 +390,9 @@
   <message name="IDS_DEVTOOLS_edb020d2175281d94054136e09a3e132" desc="Title of a setting under the Debugger category that can be invoked through the Command Menu">
     Do not pause on exceptions
   </message>
+  <message name="IDS_DEVTOOLS_ef2d5ca3248aaeb464b086e633f79d5b" desc="Error message when failing to load a script source text via the network">
+    Could not load content for <ph name="THIS__SOURCEURL"><ex>https://example.com</ex>$1s</ph> (HTTP status code: <ph name="STATUSCODE"><ex>404</ex>$2s</ph>, net error code <ph name="NETERROR"><ex>-202</ex>$3s</ph>)
+  </message>
   <message name="IDS_DEVTOOLS_efa547f7d0b9924fdc7b301838c99fad" desc="A drop-down menu option to do not emulate css media type">
     No emulation
   </message>