Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repl: avoid crashing from null and undefined errors
When `throw undefined` or `throw null` is executed, the REPL crashes. This change does a check for `null|undefined` before accessing an error's properties to prevent crashing. Fixes: nodejs#16545 Fixes: nodejs#16607 PR-URL: nodejs#16574 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
- Loading branch information