Replaced standard call to 'throw' with an Error instance

Replaced standard call to 'throw' with an Error instance so that a proper stack trace can be inspected when this exception occurs.