added throw and catch for win msg