Skip to main content

BettererError

API > @betterer/errors > BettererError

A custom Error for use in Betterer. It attaches some extra details to a standard JavaScript error for better logging and debugging.

Signature

export declare class BettererError extends Error 
Extends: Error

Constructors

ConstructorModifiersDescription
(constructor)(message, details)Constructs a new instance of the BettererError class

Properties

PropertyModifiersTypeDescription
detailsBettererErrorDetailsExtra details for the error.
isBettererErrorbooleanUsed by isBettererError() to detect that an object is an instance of BettererError.