/** * Error class for subscribers * @author Eirik Måseidvåg */ export default class SubscriberError { /** * The event that was triggered to cause the error */ readonly event: string; /** * The payload provided to the subscriber */ readonly payload: T; /** * The name of the error */ readonly name: string; /** * The message from the error */ readonly message: string; /** * The error stack */ readonly stack: string | undefined; /** * Construct the error * @template T * @param {Error} e: the original error * @param {string} event: the event that was triggered to cause the error * @param {T} payload: the payload provided to the subscriber */ constructor(e: Error, event: string, payload: T); }