the exception constructor.
the exception names to register.
import {default as Exception, registerTypes} from "apprt-core/Exception";
// register new exception type
registerTypes(Exception, "ILLEGAL_STATE_ERROR");
// now clients can invoke
const e = Exception.illegalStateError("error message");
e.name === 'ILLEGAL_STATE_ERROR';
e.message === "error message";
Converts names like
"ILLEGAL_STATE_ERROR"
to methodsillegalStateError
at given constructor.Note: This should only be used by custom Exception classes. It is exported as extra name!