Commits
Tim Donohue authored and GitHub committed 16c06624b16 Merge
268 268 | } |
269 269 | }); |
270 270 | return chunks; |
271 271 | } |
272 272 | |
273 273 | function readFileIfExists(pathToFile) { |
274 274 | if (checkIfFileExists(pathToFile)) { |
275 275 | try { |
276 276 | return fs.readFileSync(pathToFile, 'utf8'); |
277 277 | } catch (e) { |
278 - | console.error('Error:', e.stack); |
278 + | if (e instanceof Error) { |
279 + | console.error('Error:', e.stack); |
280 + | } |
279 281 | } |
280 282 | } |
281 283 | return null; |
282 284 | } |
283 285 | |
284 286 | function isOneLineCommentLine(line) { |
285 287 | return (line.startsWith("//")); |
286 288 | } |
287 289 | |
288 290 | function isStartOfMultiLineComment(line) { |