Skip to content

Commit

Permalink
Replaces a string exception with an Error() exception
Browse files Browse the repository at this point in the history
  • Loading branch information
drone1 committed Oct 6, 2024
1 parent 12d675e commit 285ee21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function getPcmData (filename, options, sampleCallback, endCallback) {
}

if (!fs.existsSync(filename)) {
throw `File doesn't exist: ${filename}`
throw new Error(`File doesn't exist: ${filename}`)
}

var ffmpeg = spawn('ffmpeg', ['-i', filename, '-f', 's16le', '-ac', channels,
Expand Down

0 comments on commit 285ee21

Please sign in to comment.