Interface EnsureOptions<E>

interface EnsureOptions<E> {
    Error?: Constructor<E>;
    capture?: boolean;
    normalize?: boolean | NormalizeOptions;
}

Type Parameters

  • E extends Error = Error

Properties

Error?: Constructor<E>

Error type objects will be ensured against; if an object is not an instance of Error, ensure will call the function passed as a create argument or, otherwise, instantiate an Exception.

capture?: boolean

Whether to use Error.captureStackTrace if running V8 to clean up the error stack trace when a new error is created. Default: false.

normalize?: boolean | NormalizeOptions

Whether to normalize the error. A boolean or an object with normalization options -see NormalizeOptions. Default: true.