1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Shorten the errors mentioning API parameters in BaseCMapReaderFactory and BaseStandardFontDataFactory

The current error-messages also mention internal parameters, which an end-user obviously don't have to care about. So, let's try to avoid confusion here by only including the API parameters.
This commit is contained in:
Jonas Jenwald 2024-07-27 16:53:13 +02:00
parent 8378c40f4c
commit d116ab1a22
2 changed files with 3 additions and 6 deletions

View file

@ -111,8 +111,7 @@ class BaseCMapReaderFactory {
async fetch({ name }) {
if (!this.baseUrl) {
throw new Error(
'The CMap "baseUrl" parameter must be specified, ensure that ' +
'the "cMapUrl" and "cMapPacked" API parameters are provided.'
"Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided."
);
}
if (!name) {
@ -149,8 +148,7 @@ class BaseStandardFontDataFactory {
async fetch({ filename }) {
if (!this.baseUrl) {
throw new Error(
'The standard font "baseUrl" parameter must be specified, ensure that ' +
'the "standardFontDataUrl" API parameter is provided.'
"Ensure that the `standardFontDataUrl` API parameter is provided."
);
}
if (!filename) {