Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/assert/assertion_error.ts

The Deno Standard Library
Latest
File
// 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"; }}