Update error method to allow for new Error objects
Add example to readme