Differences From:
File
src/db.c
part of check-in
[7a2c37063a]
- merge trunk into creole branch
by
bob on
2009-09-22 07:49:39.
Also file
src/db.c
part of check-in
[fe57da72ab]
- Make sure foreign key constraints are disabled when a new database connection
is created.
by
drh on
2009-09-19 17:58:56.
[view]
To:
File
src/db.c
part of check-in
[397fa9bf78]
- 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".
by
drh on
2009-11-06 03:10:32.
[view]
@@ -64,8 +64,12 @@
*/
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 ){
@@ -75,12 +79,12 @@
}
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);
}