js exceptions to ruby converter