Browse Source
Unlike strings, Error objects allow you to get stack traces. Also, a lot of libraries will complain if they encounter a thrown non-Error object. This is in line with standard Javascript best practices. Per https://eslint.org/docs/rules/no-throw-literal:pull/693/head
2 changed files with 5 additions and 5 deletions
Loading…
Reference in new issue