Better error output

This commit is contained in:
Pieter Vander Vennet 2024-07-29 00:26:15 +02:00
parent 62bc005534
commit 5a72ad46d4
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ export default abstract class Script {
const green = (s) => "\x1b[92m" + s + "\x1b[0m"
console.log(green("All done! (" + millisNeeded + " ms)"))
})
.catch((e) => console.log("ERROR in script:", e))
.catch((e) => console.log(`ERROR in script ${process.argv[1]}:`, e))
}
public printHelp() {

View file

@ -164,7 +164,7 @@ export class GenerateFavouritesLayer extends Script {
continue
}
if (optimized === false) {
throw "Optimized into 'false', this is weird..."
throw `Optimized ${TagUtils.Tag({or: conditions}).asHumanString()} into 'false', this is weird...`
}
tr.condition = optimized
}