Error Class Name
UnknownLocaleError.
Possible Causes
- Invalid user input.
- Misconfigured provider(s).
Documentation
An unknown or invalid locale was provided to the API.
Code
try {
Locale.from('hello-world');
} catch {
throw new UnknownLocaleError();
}