reject with error object

This commit is contained in:
Daniel Sommer 2022-02-24 10:42:06 +01:00
parent d4b776333f
commit e7f259b683

View file

@ -28,7 +28,7 @@ async function resolvePath(file) {
return await new Promise((resolve, reject) => {
realpath(file, (err, resolvedPath) => {
if (err) {
reject('resolving path \'' + file + '\' encountered an error >>> ' + err);
reject(new Error('resolving path \'' + file + '\' encountered an error >>> ' + err));
}
resolve(resolvedPath);
})