catch window errors