net-exceptions
Version:
Provides lightweight versions of the most important exceptions from Microsoft's .NET
32 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Exception_1 = require("./Exception");
/**
* The exception that is thrown when one of the arguments provided to a method is not valid.
*/
class ArgumentException extends Exception_1.Exception {
/**
* Initializes a new instance of the `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;
}
}
exports.ArgumentException = ArgumentException;
//# sourceMappingURL=ArgumentException.js.map