gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Federico's tasks -- out of range error


From: Davi Leal
Subject: Re: Federico's tasks -- out of range error
Date: Tue, 21 Oct 2008 22:46:51 +0200
User-agent: KMail/1.9.9

Federico Giménez Nieto wrote:
> >Note the line flagged as DEBUG.  We could add some check to know
> >if the error is an out-of-range error, and then instead of:
> >   $error = "ERROR:<pre> {$sqlQuery} </pre> {$r}"; // DEBUG
> >show:
> >   $error = gettext("Value out out range")." ".gettext("Please, try
> > again.");
> >
> >So the webapp shows and error message which any user will understand. What
> > do you think?
>
> Ok, we could write a separate method for the PostgreSQL class that parses
> the $r error message and outputs the understandable message. This method
> could be expanded to parse additional error messages.

IMHO a separate method is not needed in this case due to the attached patch is 
simple, easy to read, and it can be expanded.  Some comments has been added 
to make it easier to understand.

If you think that the attached patch is a good solution you could commit it.


As usual, please expose any disagreement, comment, etc.

Attachment: patch.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]