Support error handling.
Close #11