Window path runtime error

I am quite the newbie when it comes to exception handling so i was just
wondering what i would do when i rescue this runtime error,
RuntimeError: bad window path name “.w00004.w00005” it occurs when i
close a root window to another process that is stepping through a loop
and bringing up windows to ask the user for input. i was just wondering
what should i do when i rescue this error?