[ic] Displaying SQL-Errors in the Administration Panel

Stefan Hornburg racke at linuxia.de
Thu Jul 10 12:20:13 EDT 2003


On Wed, 9 Jul 2003 22:28:53 -0400
Mike Heins <mike at perusion.com> wrote:

> Quoting Stefan Hornburg (Racke) (racke at linuxia.de):
> > > > Isn't it possible, that all SQL-Errors are displayed in the 
> > > > administration-panel? That's what I thougt should be the default! I
> > > > use IC v.4.9.7.
> > > > 
> > > 
> > > I believe you are right. I have been ignoring this issue for
> > > some time, but will be fixing it soon.
> > > 
> > > For the moment, you have to look at the global error.log file. Ugh.
> > > 
> > 
> > As long as there is no Internal Server Error, these messages can be
> > found in the catalog error log, but a feedback for the user is really
> > a good idea.
> > 
> 
> I am working on it now. There is some question in my mind as to
> what should be done on an error, and my inclination is to do this:
> 
>     1. Set up logging levels on a per-table basis, with
>        defaults that can be set with DatabaseDefault:
> 
>         DatabaseDefault  LOG_ERROR_CATALOG  1
>         DatabaseDefault  LOG_ERROR_SESSION  1
>         DatabaseDefault  LOG_ERROR_GLOBAL   0
>         DatabaseDefault  DIE_ERROR          0
> 
>     2. Log errors to the catalog error.log by default.
> 
>         Database  inventory LOG_ERROR_CATALOG  0|1*
> 
>     3. Log errors to the session always if an admin, and
>        controlled by configuration if not.
> 
>         Database  inventory LOG_ERROR_SESSION  0|1*
> 
>        This would have the effect of giving a big red error message
>        when such an event as failing to create a record occured. In
>        most cases, you would be able to use the <-Back button and
>        fix the error and resubmit.
> 
>     4. Die at the page level (500 error) only if that is explicit
>        request in config for that table:
> 
>         Database  inventory  DIE_ERROR  0*|1
> 
>     5. Log errors globally only on explicit request:
> 
>         Database  inventory LOG_ERROR_GLOBAL   0*|1
> 
>     6. LENGTH_EXCEPTION errors would go into warnings if they
>        are handled with truncate.
> 
>   * default
> 
> Does this seem reasonable?

This plan sounds very reasonable. Have you thought about a way
to notice callers like the following:

[perl tables=foo]
$Db{foo}->query({selectx from bar});
[/perl]

about the fates of their queries ?

BTW: Why does mailman adds the sender now to reply-to ??

Bye
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list