improved error printing
This commit is contained in:
parent
f71e009a35
commit
c4acd80fc5
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ export default function parseSeries(data: DataToPass): void {
|
||||||
// last part of the url without the slash
|
// last part of the url without the slash
|
||||||
let lastPath = _urlPath.slice(_urlPath.lastIndexOf("/") + 1)
|
let lastPath = _urlPath.slice(_urlPath.lastIndexOf("/") + 1)
|
||||||
if (!lastPath.includes("_") && !lastPath.startsWith("0"))
|
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)
|
// if file is a series descriptor or not (not = regular series post)
|
||||||
const isFileDescriptor = lastPath.startsWith("0") && !lastPath.includes("_")
|
const isFileDescriptor = lastPath.startsWith("0") && !lastPath.includes("_")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue