summaryrefslogtreecommitdiff
path: root/std/path
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-21 10:36:13 -0500
committerGitHub <noreply@github.com>2020-02-21 10:36:13 -0500
commitdd8a10948195f231a6a9eb652e3f208813904ad6 (patch)
treef9a4afeb67bbead882c29c2458a5f1f99e2e42db /std/path
parentd9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff)
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'std/path')
-rw-r--r--std/path/glob.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/std/path/glob.ts b/std/path/glob.ts
index a079f448f..8eb106b25 100644
--- a/std/path/glob.ts
+++ b/std/path/glob.ts
@@ -3,8 +3,6 @@ import { globrex } from "./globrex.ts";
import { join, normalize } from "./mod.ts";
import { assert } from "../testing/asserts.ts";
-const { DenoError, ErrorKind } = Deno;
-
export interface GlobOptions {
extended?: boolean;
globstar?: boolean;
@@ -91,10 +89,7 @@ export function normalizeGlob(
{ globstar = false }: GlobOptions = {}
): string {
if (!!glob.match(/\0/g)) {
- throw new DenoError(
- ErrorKind.InvalidPath,
- `Glob contains invalid characters: "${glob}"`
- );
+ throw new Error(`Glob contains invalid characters: "${glob}"`);
}
if (!globstar) {
return normalize(glob);