throw exception when window can't be created