improved exception for js parser