[wp-trac] Re: [WordPress Trac] #10293: Error conditions of WPDB unparseable by Code

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 28 12:34:03 GMT 2009


#10293: Error conditions of WPDB unparseable by Code
----------------------------+-----------------------------------------------
 Reporter:  dd32            |       Owner:                                    
     Type:  enhancement     |      Status:  new                               
 Priority:  normal          |   Milestone:  Future Release                    
Component:  Administration  |     Version:  2.9                               
 Severity:  normal          |    Keywords:  dev-feedback 2nd-opinion has-patch
----------------------------+-----------------------------------------------
Description changed by dd32:

Old description:

> I'm developing something which is making use of a new WPDB class,
> However, i've run into a slight issue with error handling.
>
> I'd like to have the ability to tell what the error was while attempting
> to connect, without having to display the verbose text error to the user.
>
> My thought is to store a error code in the WP_Error extra section, Or
> maybe change the 500 error code to be the default, unless something else
> is supplied..
>
> See patch for the first thought, the 500 idea only just came to mind..

New description:

 I'm developing something which is making use of a new WPDB class, However,
 i've run into a slight issue with error handling.

 I'd like to have the ability to tell what the error was while attempting
 to connect, without having to display the verbose text error to the user.

 My thought is to store a error code in the WP_Error extra section, Or
 maybe change the 500 error code to be the default, unless something else
 is supplied..

 See patch for the first thought, the 500 idea only just came to mind..

 ----
 Theres a 2nd issue which is outlined in that patch, the Username in the
 select-db message may be incorrect for custom-connected DB's not using the
 DB_* constants.. see patch which stores the username in a class var..

--

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10293#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list