add missing new when throw exception
Merge pull request #2 from pilip/fix-throwing-exception

add missing new when throw exception