Fixes #351, introduce throwWhen option
snapshot