fixed processing of uncaught js errors called from ruby