Better (more private...) error handling

This commit is contained in:
2026-03-13 12:01:13 +01:00
parent 69fc7235c6
commit 4b9b5b737d
2 changed files with 22 additions and 5 deletions

View File

@@ -1,12 +1,15 @@
'use strict';
import * as fs from 'fs';
import * as path from 'path';
import Manifest from './Manifest.js';
import Sequence from './Sequence.js';
import Canvas from './Canvas.js';
import Image from './Image.js';
import ManifestMetadata from './Metadata.js';
/**
* @namespace Common
*/
const Common = {};
const authors = {
@@ -103,6 +106,8 @@ Common.getParamsFromFolders = async function() {
/**
* @param {string} manifestId
* @returns {string[]}
* @throws `readdir` will thrown an ENOENT error if the images folder doesn't exist.
* The manifest route should catch it.
*/
Common.getImageList = async function (manifestId) {
// Regex to exclude images with certain patterns in filename