diff --git a/src/io.ts b/src/io.ts index 5303d3e..cf8f6ec 100644 --- a/src/io.ts +++ b/src/io.ts @@ -8,7 +8,12 @@ import type { InputMessage, OutputMessage } from './types.ts'; */ async function* readStdin(): AsyncGenerator { for await (const line of readLines(Deno.stdin)) { - yield JSON.parse(line); + try { + yield JSON.parse(line); + } catch (e) { + console.error(line); + throw e; + } } }