boa
boa copied to clipboard
Add context information to `not a constructor` `TypeError`
There are a few places where we throw a TypeError
signaling that a value is not a constructor
. Right now those errors do not contain specific information to find out why or where the error occurred.
- The produced error should contain useful information (variable name(?), type of the value (?)) that makes it easier to find out why the error occurred.
- All of the places where we throw this error should have a similar syntax for the error text.
This also happens where we have "not a callable function".