Sep 13, 2018

console.error and throw new Error in JavaScript

In some cases,  throw new Error() is better than console.error().
console.error("test console");
throw new Error("test throw");