proper exception gating when calling js class member functions (apply)