Add @errorHandler to deal with errors manually

Fixes #9.