added throwExceptions option
update documentation
update unittest