UNPKG

@tsdotnet/exceptions

Version:

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/exceptions/blob/master/LICENSE) ![npm-publish](https://github.com/tsdotnet/exceptions/workflows/npm-publish/badge.svg) [![npm version](htt

30 lines (29 loc) 980 B
/*! * @author electricessence / https://github.com/electricessence/ * Licensing: MIT * Based upon: https://msdn.microsoft.com/en-us/library/System.Exception%28v=vs.110%29.aspx */ /** * Represents errors that occur during application execution. */ export default class Exception implements Error { readonly message: string; readonly innerException?: unknown; readonly name: string; readonly stack: string; /** * Initializes a new instance of the Exception class with a specified error message and optionally a reference to the inner exception that is the cause of this exception. * @param message * @param innerException */ constructor(message?: string, innerException?: unknown); /** * The string representation of the Exception instance. */ toString(): string; /** * A string representation of the error type. */ protected getName(): string; protected toStringWithoutBrackets(): string; }