Throw Error objects rather than strings

Resolves #9