handle exceptions in a gtk dialog