deno.land / std@0.224.0 / assert / assertion_error.ts

assertion_error.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
/** * Error thrown when an assertion fails. * * @example * ```ts * import { AssertionError } from "https://deno.land/std@$STD_VERSION/assert/assertion_error.ts"; * * throw new AssertionError("Assertion failed"); * ``` */export class AssertionError extends Error { /** Constructs a new instance. */ constructor(message: string) { super(message); this.name = "AssertionError"; }}
std

Version Info

Tagged at
3 weeks ago