Don't swallow exceptions in javascript parser

This fixes issue #325.