* Either redirects a pair of (errorId, ...args) to a URL where the full * message is displayed, or displays it from a fetched table. * * This method is used by the output of the `transform-log-methods` babel * plugin. It should not be used directly. Use the (*error|assert*|info|warn)
(parts)
| 349 | * @private |
| 350 | */ |
| 351 | expandMessageArgs_(parts) { |
| 352 | // First value should exist. |
| 353 | const id = parts.shift(); |
| 354 | // Best effort fetch of message template table. |
| 355 | // Since this is async, the first few logs might be indirected to a URL even |
| 356 | // if in development mode. Message table is ~small so this should be a short |
| 357 | // gap. |
| 358 | if (getMode(this.win).development) { |
| 359 | this.fetchExternalMessagesOnce_(); |
| 360 | } |
| 361 | |
| 362 | return this.messages_?.[id] |
| 363 | ? [this.messages_[id]].concat(parts) |
| 364 | : [`More info at ${externalMessageUrl(id, parts)}`]; |
| 365 | } |
| 366 | |
| 367 | /** |
| 368 | * Throws an error if the first argument isn't trueish. |
no test coverage detected