Re: DB dont_die and errors

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

 



Il 23:15, venerdì 27 maggio 2005, Bastien Koert ha scritto:
> You should be able to comment out the error message portions that you don't
> want to display
>

I'm not sure I understand you, are you suggesting to modify DB.php code to 
change the way it process error messages?

If yes, I don't believe it'a good idea, I don't want to change PEAR code, 
there must be a way to configure PEAR error to handle connection errors 
without dying and without printing DB authentication information to the 
browser.

If checking for a valid connection _before_ going through DBDataObject to 
retrieve DB data is the only way, it introduces some overload (since every 
script must check for connection before proceeding), but I feel it's a better 
way than changing PEAR code directly.


BTW, thanks for your hints.



> >Hi all,
> >
> >When the connection fails, the default behaviour is to die, printing also
> >the
> >dns, with user and password!!!
> >
> >How can I avoid this?
> >
> >When I set dont_die, it goes on but the script stops later with a fatal
> >error
> >(since DB is not initialized).
> >
> >Does anybody knows a graceful way to handle connection errors.
> >
> >I'm using DBDataObject to do all the DB stuff but the internals of this
> >class
> >don't check for PEAR errors after calling connect(), should I subclass it
> >and
> >rewrite some methods?
> >
> >Bye.
> >--
> >Alessandro Pasotti
> >ICQ# 245871392
> >Linux User #167502
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Alessandro Pasotti
ICQ# 245871392
Linux User #167502

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux