Further js error handling, primarily in jsdom.cpp
also alter initLocationClass to return a status