List:MySQL++« Previous MessageNext Message »
From:Jake Colman Date:November 25 2013 1:38pm
Subject:Re: Problem Catching BadQuery Exception
View as plain text  
I am doing a simple SELECT and specifying an invalid column or table name
in the SELECT statement.  The connection object is created with the default
constructor so I'm expecting exceptions to be thrown.  When I execute the
SELECT using the Query::store() method the exception is not being thrown.
 Instead, I have to do a bool check on the result object and then I can see
the error.  Is there something subtle I might have missed about how to set
this up?

For what it's worth, I am assigning the connection object to another
connection object.  But I checked the code and the assignment operator  is
supported so I'd expect that the copy would function the same as the
original.

Full disclosure:  I did not download and install mysqlpp.  I have inherited
an existing installation.  I am working with Visual Studio 2005 and mysqlpp
is one of the projects in my solution.

If you need more info, I'll send a few lines of code that demonstrate the
problem.

Thanks.

*Jake Colman*

*Director, Development *| Billtrust

Tel: 609.235.0792 | email: jcolman@stripped | Web: www.billtrust.com

Follow us: Twitter <http://www.twitter.com/billtrust>|
Facebook<http://www.facebook.com/Billtrust.CompleteBilling>|
LinkedIn <http://www.linkedin.com/company/99112> |
Blog<http://blog.billtrust.com/>


On Mon, Nov 25, 2013 at 12:33 AM, Warren Young <mysqlpp@stripped> wrote:

> On Nov 24, 2013, at 9:17 PM, Jake Colman <jcolman@stripped> wrote:
>
> > If I form a bad SELECT statement
>
> Bad in what way, exactly?
>
> If it's not revealing proprietary information, paste the schema for the
> table and the query against it into your reply.
>
> Alternately, tell us which line of code in MySQL++ returns the error code
> to your app, which would tell us where the exception should be thrown from.
>
> > If, for example,
> > I specify an invalid column name in the result, I do get an exception
> > thrown.  How can I force bad queries to throw a BadQuery exception?
>
> These two things together tell me that exceptions are doing exactly what
> they're supposed to, and you're asking for us to add a new exception to a
> code path that never threw them before.
>
> As asked above, I have no way to tell whether there's a good reason we
> don't throw an exception in the failure path that affects you.
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus
>
>

Thread
Problem Catching BadQuery ExceptionJake Colman25 Nov
  • Re: Problem Catching BadQuery ExceptionWarren Young25 Nov
    • Re: Problem Catching BadQuery ExceptionJake Colman25 Nov
      • Re: Problem Catching BadQuery ExceptionWarren Young25 Nov
        • Re: Problem Catching BadQuery ExceptionJake Colman25 Nov
          • Re: Problem Catching BadQuery ExceptionWarren Young25 Nov
            • Re: Problem Catching BadQuery ExceptionJake Colman25 Nov
              • Re: Problem Catching BadQuery ExceptionWarren Young25 Nov
                • Re: Problem Catching BadQuery ExceptionJake Colman25 Nov
                  • Re: Problem Catching BadQuery ExceptionWarren Young25 Nov
                    • Re: Problem Catching BadQuery ExceptionJake Colman25 Nov
        • Re: Problem Catching BadQuery ExceptionJonathan Wakely25 Nov