79333812

Date: 2025-01-06 17:20:47
Score: 1.5
Natty:
Report link

@orphic-lacuna most helpful - thank you. I have all those options set. But I see a different effect of 'new'.

Consider the following script:

outer();

function outer(){
    middle();
    }

function middle(){
    inner();
    }

function inner(){
    bullseye();
    }

function bullseye(){
    throw("Inside bullseye");
    }

As written, it displays just "Inside bullseye". If I replace the penultimate line with

throw new Error("Inside bullseye");

then I get

middle line 8 Error: Inside bullseye
called from outer line 4
called from line 1

However, when I omit the new

throw Error("Inside bullseye");

then I get

inner line 12 Error: Inside bullseye
called from middle line 8
called from outer line 4
called from line 1

which is a deeper trace.

I am happy with this.

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @orphic-lacuna
  • Low reputation (1):
Posted by: Antipole