summaryrefslogtreecommitdiff
path: root/std/io/bufio.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/io/bufio.ts')
-rw-r--r--std/io/bufio.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/std/io/bufio.ts b/std/io/bufio.ts
index fa0ba7e73..12b5c2d2b 100644
--- a/std/io/bufio.ts
+++ b/std/io/bufio.ts
@@ -21,11 +21,11 @@ export class BufferFullError extends Error {
}
}
-export class UnexpectedEOFError extends Error {
- name = "UnexpectedEOFError";
+export class PartialReadError extends Deno.errors.UnexpectedEof {
+ name = "PartialReadError";
partial?: Uint8Array;
constructor() {
- super("Unexpected EOF");
+ super("Encountered UnexpectedEof, data only partially read");
}
}
@@ -178,7 +178,7 @@ export class BufReader implements Reader {
if (bytesRead === 0) {
return Deno.EOF;
} else {
- throw new UnexpectedEOFError();
+ throw new PartialReadError();
}
}
bytesRead += rr;