fix(DynamicParser): Correctly handle throwing exceptions from method.

Fixes #971