mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: reduce number of ErrorKind variants (#3662)
This commit is contained in:
parent
e83658138b
commit
c90036ab88
13 changed files with 61 additions and 224 deletions
|
@ -12,7 +12,6 @@
|
|||
// TODO don't disable this warning
|
||||
|
||||
import { AbortSignal, QueuingStrategySizeCallback } from "../dom_types.ts";
|
||||
import { DenoError, ErrorKind } from "../errors.ts";
|
||||
|
||||
// common stream fields
|
||||
|
||||
|
@ -208,10 +207,7 @@ export function cloneValue(value: any): any {
|
|||
default:
|
||||
// TODO this should be a DOMException,
|
||||
// https://github.com/stardazed/sd-streams/blob/master/packages/streams/src/shared-internals.ts#L171
|
||||
throw new DenoError(
|
||||
ErrorKind.DataCloneError,
|
||||
"Uncloneable value in stream"
|
||||
);
|
||||
throw new Error("Uncloneable value in stream");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue