Skip to main content
Module

x/rhum/mod.ts>Interfaces.IError

A test double library
Latest
interface Interfaces.IError
import { type Interfaces } from "https://deno.land/x/rhum@v2.2.0/mod.ts";
const { IError } = Interfaces;

Interface that all errors must follow. This is useful when a client wants to throw a custom error class via .willThrow() for mocks and fakes.

Properties

name: string

The name of the error (shown before the error message when thrown). Example: ErrorName: <error message goes here>.

optional
message: string

The error message. Allows undefined in case there is no message.