1.0.0 • Published 4 years ago

exceptions-node v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

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");
}