mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853)
This commit is contained in:
parent
9331e2cef0
commit
7d9ba09f5a
3 changed files with 26 additions and 3 deletions
|
@ -17,6 +17,7 @@ const {
|
|||
import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js";
|
||||
import { errorMap } from "ext:deno_node/internal_binding/uv.ts";
|
||||
import { codes } from "ext:deno_node/internal/error_codes.ts";
|
||||
import { ERR_NOT_IMPLEMENTED } from "ext:deno_node/internal/errors.ts";
|
||||
|
||||
export type BinaryEncodings = "binary";
|
||||
|
||||
|
@ -34,8 +35,7 @@ export type TextEncodings =
|
|||
export type Encodings = BinaryEncodings | TextEncodings;
|
||||
|
||||
export function notImplemented(msg: string): never {
|
||||
const message = msg ? `Not implemented: ${msg}` : "Not implemented";
|
||||
throw new Error(message);
|
||||
throw new ERR_NOT_IMPLEMENTED(msg);
|
||||
}
|
||||
|
||||
export function warnNotImplemented(msg?: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue