[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-plusplus
Subject:    Re: exceptions in MySQL
From:       Bhaskar Borthakur <bhaskarb () qualcomm ! com>
Date:       2003-10-15 0:04:04
[Download RAW message or body]

At 05:48 PM 10/14/2003 -0600, Warren Young wrote:
>bhaskarb wrote:
>
>>But query.store() /* as can be seen in the code snippet below*/ throws the
>>same exception (BadQuery) for both the cases.
>
>You could examine the 'error' member of the query object to distinguish 
>between the two for now.  But I agree with you, a new object type should 
>be created to be thrown in this case.  Maybe that will occur in 1.8.0? One 
>can hope.


The main problem with this approach is that the 'error' member variable in 
the class BadQuery is a string and not an well defined 'int' or an 'enum'. 
So it does not look too safe to determine what the exceptions occurred 
based on an explanatory string since it might change from version to version.

thanks
bhaskar



>--
>MySQL++ Mailing List
>For list archives: http://lists.mysql.com/plusplus
>To unsubscribe:    http://lists.mysql.com/plusplus?unsub=bhaskarb@qualcomm.com
>



-- 
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:    http://lists.mysql.com/plusplus?unsub=mysql-plusplus@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic