[svk-commit] r2393 - trunk/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Tue May 8 10:00:58 EDT 2007


Author: clkao
Date: Tue May  8 10:00:57 2007
New Revision: 2393

Modified:
   trunk/lib/SVK/XD.pm

Log:
Improve error reporting when failed to save config.

Modified: trunk/lib/SVK/XD.pm
==============================================================================
--- trunk/lib/SVK/XD.pm	(original)
+++ trunk/lib/SVK/XD.pm	Tue May  8 10:00:57 2007
@@ -291,14 +291,14 @@
 
     if (-f $oldfile ) { 
       rename ( $oldfile => $ancient_backup ) ||
-	die loc("Couldn't remove your old backup configuration file %1 while writing the new one.", $oldfile);
+	die loc("Couldn't remove your old backup configuration file %1 while writing the new one: %2.\n", $oldfile, $!);
     }
     if (-f $file ) {
         rename ($file => $oldfile) ||
-        	die loc("Couldn't remove your old configuration file %1 while writing the new one.", $file);
+        	die loc("Couldn't remove your old configuration file %1 while writing the new one: %2.\n", $file, $!);
     }
     rename ($tmpfile => $file) ||
-	die loc("Couldn't write your new configuration file %1. A backup has been stored in %2. Please replace %1 with %2 immediately.", $file, $tmpfile);
+	die loc("Couldn't write your new configuration file %1. A backup has been stored in %2. Please replace %1 with %2 immediately: %3.\n", $file, $tmpfile, $!);
 
     if (-f $ancient_backup ) {
       unlink ($ancient_backup) ||


More information about the svk-commit mailing list