lib: remove unused internal error constructors
First commit removes exports for internal error constructors. Now all internal errors must be thrown using the new system: throw new errors.codes.MY_ERROR('xxx')
instead of throw new errors.Error('MY_ERROR', 'xxx')
.
Second commit updates the internal errors documentation following this change.
@BridgeAR I tried to move SystemError to makeNodeErrorWithCode but it's not obvious to me how that could be done because the error code is not fixed, so I left it as is for now.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines