window try catch