UNPKG

@manuth/exceptions

Version:

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

29 lines 905 B
import { Exception } from "./Exception.js"; /** * The exception that is thrown when one of the arguments provided to a method is not valid. */ export class ArgumentException extends Exception { /** * Initializes a new instance of the {@linkcode ArgumentException} class. * * @param message * The error message that explains the reason for the exception. * * @param paramName * The name of the parameter that causes this exception. * * @param innerException * The Exception instance that caused the current exception. */ constructor(message, paramName, innerException) { super(message, innerException); this.paramName = paramName; } /** * Gets the name of the parameter that causes this exception. */ get ParamName() { return this.paramName; } } //# sourceMappingURL=ArgumentException.js.map