improved error printing

This commit is contained in:
Kim, Jimin 2022-01-18 11:51:36 +09:00
parent f71e009a35
commit c4acd80fc5

View file

@ -19,7 +19,7 @@ export default function parseSeries(data: DataToPass): void {
// last part of the url without the slash
let lastPath = _urlPath.slice(_urlPath.lastIndexOf("/") + 1)
if (!lastPath.includes("_") && !lastPath.startsWith("0"))
throw Error(`Invalid series file name at: ${path}`)
throw Error(`Invalid series file name at: "${path}"`)
// if file is a series descriptor or not (not = regular series post)
const isFileDescriptor = lastPath.startsWith("0") && !lastPath.includes("_")