catch pygui errors