// 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 "@std/assert/assertion-error";
 *
 * throw new AssertionError("Assertion failed");
 * ```
 */
export class AssertionError extends Error {
  /** Constructs a new instance. */
  constructor(message: string) {
    super(message);
    this.name = "AssertionError";
  }
}

// denoCacheMetadata={"headers":{"cf-cache-status":"HIT","content-length":"484","etag":"\"aa90e38accb8e6ab4a20a0b33c7ceef9\"","date":"Tue, 28 Jul 2026 12:31:15 GMT","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","set-cookie":"__cf_bm=1DHfKtcQNgGFSqaFfIf.LFer5DDsRvrN7hyuPDJAVkU-1785241875.3346975-1.0.1.1-OZ6YbKUbBmyeyhahOKKv3P_mmf8WZE7RPPaS9DupvSFgLRybXY_h5Fp2YZNGr4fgVLUAI5u7hs7TzN7Vog230PrlsUWHV1R9uBurINOHYlwkHixNoZbbuR9ZSiA8pDXh; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","alt-svc":"h3=\":443\"; ma=86400","content-type":"text/typescript","server":"cloudflare","x-jsr-backend":"modules","cross-origin-resource-policy":"cross-origin","cache-control":"public, max-age=31536000, immutable","accept-ranges":"bytes","access-control-allow-origin":"*","x-content-type-options":"nosniff","access-control-expose-headers":"*","x-robots-tag":"noindex","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","vary":"Origin","cf-ray":"a223e658cd907db6-LAX","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=iDXanRh9%2FRo8%2BjboFOyi14nw4%2BLJolw%2FTnDQIJzziMzUYNgH3UD0NKjQv%2BInoxU6oa4fwz0XL4WV8cWs4kEcEAozobqyrQxKO8UkvkAy55yNRk7p2OczrhU%3D\"}]}","age":"46830"},"url":"https://jsr.io/@std/assert/0.224.0/assertion_error.ts","time":1785241875}