boa icon indicating copy to clipboard operation
boa copied to clipboard

Add context information to `not a constructor` `TypeError`

Open raskad opened this issue 3 years ago • 1 comments

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.

raskad avatar Dec 24 '21 01:12 raskad

This also happens where we have "not a callable function".

Razican avatar Dec 24 '21 11:12 Razican