~rainct/zeitgeist/961974

« back to all changes in this revision

Viewing changes to src/utils.vala

  • Committer: Siegfried-Angel Gevatter Pujals
  • Date: 2012-04-05 12:12:49 UTC
  • Revision ID: siegfried@gevatter.com-20120405121249-k6e2ajamjik0x5s5
Enhanced database corruption detection and recovery.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
            original.copy (destination, FileCopyFlags.OVERWRITE, null, null);
131
131
        }
132
132
 
133
 
        public void retire_database () throws Error
 
133
        public void retire_database () throws EngineError
134
134
        {
135
 
            File dbfile = File.new_for_path (get_database_file_path ());
136
 
            dbfile.set_display_name (get_database_file_retire_name ());
 
135
            try
 
136
            {
 
137
                File dbfile = File.new_for_path (get_database_file_path ());
 
138
                dbfile.set_display_name (get_database_file_retire_name ());
 
139
            }
 
140
            catch (Error err)
 
141
            {
 
142
                string message = "Could not rename database: %s".printf (
 
143
                    err.message);
 
144
                throw new EngineError.DATABASE_RETIRE_FAILED (message);
 
145
            }
137
146
        }
138
147
 
139
148
        /**