repl: handle unexpected error objects
This commit allows the repl's domain error handler to process unexpected error formats, such as primitives.
Fixes: https://github.com/nodejs/node/issues/12373
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
repl