Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
More plist error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
GDColon committed Jul 13, 2020
1 parent e02c5b1 commit 99d7327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shuffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ resources.forEach(x => {
sheetNames.forEach(x => {
let file = fs.readFileSync(`${gdPath}/${x}.plist`, 'utf8')
plists.push(file)
sheets.push(plistToJson(file))
try { sheets.push(plistToJson(file)) }
catch(e) { throw `Error parsing ${x}.plist - ${e.message}` }
})

sheets.forEach((gameSheet, sheetNum) => {
Expand Down

2 comments on commit 99d7327

@bananica2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: ENOENT: no such file or directory, open 'directory.txt'
at Object.openSync (fs.js:440:3)
at Object.readFileSync (fs.js:342:35)
at Object.readFileSync (C:\Users\MP\Desktop\shuffle.exe:201:55)
at Object. (C:\Users\MP\Desktop\shuffle.js:39:17)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11

@layercak3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bananica2: Make sure directory.txt is in the same folder as shuffle.js.

Please sign in to comment.