tools: replace custom new-with-error rule
Use no-restricted-syntax to implement the requirement that Error
objects must be thrown with the new
keyword.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
tools