UNPKG

@manuth/exceptions

Version:

Provides lightweight versions of the most important exceptions from Microsoft's .NET

47 lines (46 loc) 1.5 kB
/** * Represents errors that occur during application execution. */ export declare class Exception extends Error { /** * A collection of key/value pairs that provide additional user-defined information about the exception. */ private data; /** * The Exception instance that caused the current exception. */ private innerException?; /** * Initializes a new instance of the {@linkcode Exception} class. * * @param message * A message that describes the current exception. * * @param innerException * The Exception instance that caused the current exception. */ constructor(message?: string, innerException?: Exception); /** * Gets a collection of key/value pairs that provide additional user-defined information about the exception. */ get Data(): any[]; /** * Gets the Exception instance that caused the current exception. */ get InnerException(): Exception | undefined; /** * Gets a message that describes the current exception. */ get Message(): string; /** * Gets a string representation of the immediate frames on the call stack. */ get StackTrace(): string | undefined; /** * When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. * * @returns * The exception which is the root cause of this exception. */ GetBaseException(): Exception; }