gitk: Report errors in saving config file

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff --git a/gitk b/gitk
index 3425066..26a7db4 100755
--- a/gitk
+++ b/gitk
@@ -2818,7 +2818,7 @@
 
     if {$stuffsaved} return
     if {![winfo viewable .]} return
-    catch {
+    if {[catch {
 	if {[file exists $config_file_tmp]} {
 	    file delete -force $config_file_tmp
 	}
@@ -2884,6 +2884,8 @@
 	puts $f "}"
 	close $f
 	file rename -force $config_file_tmp $config_file
+    } err]} {
+        puts "Error saving config: $err"
     }
     set stuffsaved 1
 }