Skip to content

[BUG] Intl.DisplayNames regionName.of ERROR with RangeError: invalid_argument #14

Description

@panaC

EDIT: I thought it was a crash/bug from Gauthier during screen sharing in Thorium-desktop confcall

[2]   r2:navigator#electron/renderer/index_ regionName.of throw an error with  SHAW RangeError: invalid_argument
[2]     at DisplayNames.of (<anonymous>)
[2]     at /home/gau/Documents/GIT/EDRLAB/thorium-reader/node_modules/readium-speech/cjs/voices.js:389:35
[2]     at Array.reduce (<anonymous>)
[2]     at listRegions (/home/gau/Documents/GIT/EDRLAB/thorium-reader/node_modules/readium-speech/cjs/voices.js:384:19)
[2]     at groupByRegions (/home/gau/Documents/GIT/EDRLAB/thorium-reader/node_modules/readium-speech/cjs/voices.js:420:32)
[2]     at ReaderHeader.setVoices (http://localhost:8191/index_reader.js:31297:103)
[2]     at http://localhost:8191/index_reader.js:30882:22 +1ms

speech/src/voices.ts

Lines 421 to 427 in 0b23993

try {
if (regionName) {
name = regionName.of(region) || region;
}
} catch (e) {
console.error("regionName.of throw an error with ", region, e);
}

The throwing error from Intl.DisplayNames is catched and logged, see above

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Draft

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions