remove unused debug
assert object type in ctx.onerror
Merge pull request #265 from dead-horse/throw-not-error

Throw not error