Overview
SHA1 Hash: | 397fa9bf785aec6dfbcdfb812d9ae2a3848cbaf9 |
---|---|
Date: | 2009-11-06 03:10:32 |
User: | drh |
Comment: | After any kind of database error, include in the error message a warning to the user that it might be wise to run "fossil all rebuild". |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/db.c from [16bc22dd3c] to [1d7cecfa32].
@@ -63,10 +63,14 @@ ** Call this routine when a database error occurs. */ static void db_err(const char *zFormat, ...){ va_list ap; char *z; + static const char zRebuildMsg[] = + "If you have recently updated your fossil executable, you might\n" + "need to run \"fossil all rebuild\" to bring the repository\n" + "schemas up to date.\n"; va_start(ap, zFormat); z = vmprintf(zFormat, ap); va_end(ap); if( g.xferPanic ){ cgi_reset_content(); @@ -74,14 +78,14 @@ cgi_reply(); } if( g.cgiPanic ){ g.cgiPanic = 0; cgi_printf("<h1>Database Error</h1>\n" - "<pre>%h</pre>", z); + "<pre>%h</pre><p>%s</p>", z, zRebuildMsg); cgi_reply(); }else{ - fprintf(stderr, "%s: %s\n", g.argv[0], z); + fprintf(stderr, "%s: %s\n\n%s", g.argv[0], z, zRebuildMsg); } db_force_rollback(); exit(1); }