pass error to end() as well
add comment
Merge pull request #2 from uber/support-assert

Support assert