implement window_error