Throw error instead of emit error for fixing unexpected type (#931)
Throw error instead of emit error for fixing unexpected type (#931)

* Fix unexpected type by returning emit() directly

* Throw error instead of emit error

* Change to more accurate TypeError from just Error

Co-authored-by: bdistin <2eeec3c28de01a750a182e6f3e99fec572e839dc@gmail.com>

dirigeants/klasa