[pmwiki-devel] dataquery and ADOdb errors in general
gmane at auxbuss.com
Wed Jan 10 09:24:56 CST 2007
We've already been over the ground of the "Database Standard" managing
its own db error messages and agreed - I think - to differ over the
merits of doing this. This is not intended to go over that ground again,
although it's inextricably related.
I notice in the dataquery recipe that db error messages can be
displayed, emailed, or written to a PmWiki page. These are fine things.
However, they also already come for free in ADOdb (where, in addition,
by following the error_log mechanism, you can write to server logs and
ADOdb has an inbuilt error handler. Basically it runs the script
which one customizes to taste.
Would it not be simpler to manage all db errors in one place?
The benefits of doing this are that all recipes will automatically be
provided with a db error handler. The recipe author has to do nothing at
all to benefit from this.
>From an admin POV, db error reporting is centralised and can be managed
as a single task.
In addition, one can take advantage of PmWiki's features. For example, I
like to receive emails or text messages on my mobile when db errors
occur. That's fine, but then there's the problem of managing a
potentially constant stream of emails. Instead, I write errors to a
PmWiki page (and to a file, as it happens) and then apply a notify on
that page. In this way, I can receive immediate notification of a
problem, and can set the notify params to suppress a potential avalanche
And all that for all dbs in a dozen lines in adodb-errorhandler.inc.php
and a single notify line.
More information about the pmwiki-devel