catch error thrown in cross-domain iframe