Better (more private...) error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user