@ocubist/error-alchemy
Version:
A powerful Node.js error-handling-framework with custom error types for easy debugging, enhanced error management, strong zod-support and useful quality-of-life-functionality for asserting and validating values.
22 lines (19 loc) • 631 B
text/typescript
import { TransmutedError } from "./TransmutedError";
import { TransmutedErrorProps } from "./types";
/**
* Class representing a synthesized error, which is an error that is clearly identified and ready to be handled immediately.
*
* @extends TransmutedError
*/
export class SynthesizedError extends TransmutedError {
/**
* Constructs a new SynthesizedError.
*
* @param {TransmutedErrorProps} props - The properties of the synthesized error.
*/
constructor(props: TransmutedErrorProps) {
super(props);
// Set the prototype explicitly.
Object.setPrototypeOf(this, SynthesizedError.prototype);
}
}