1.0.0 • Published 4 years ago
exceptions-node v1.0.0
Implemented Exceptions for node js
Exceptions List
CloneNotSupportedException(message);
ClassNotFoundException(message);
IllegalAccessException(message);
InstantiationException(message);
NoSuchFieldException(message);
NoSuchMethodException(message);
InterruptedException(message);
RuntimeException(message);
ArithmeticException(message);
ArrayStoreException(message);
ClassCastException(message);
EnumConstantNotPresentException(message);
IllegalArgumentException(message);
IllegalMonitorStateException(message);
IllegalStateException(message);
IndexOutOfBoundsException(message);
NegativeArraySizeException(message);
NullPointerException(message);
SecurityException(message);
TypeNotPresentException(message);
UnsupportedOperationException(message);
Example
const { NullPointerException } = require("./index");
let x = null;
if(x === null) {
throw new NullPointerException("x cannot be null");
}
1.0.0
4 years ago